New issue
Advanced search Search tips

Issue 776733 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task

Blocking:
issue 765164



Sign in to add a comment

RemoteSuggestionsProviderImpl::ClearCachedSuggestions does nothing if RemoteSuggestionsProviderImpl is not initiated

Project Member Reported by gambard@chromium.org, Oct 20 2017

Issue description

I want to have the suggestions adapted to the device's locale. To do that, I am calling ContentSuggestionsService::ClearAllCachedSuggestions(), which call RemoteSuggestionsProviderImpl::ClearCachedSuggestions().
However, as I am calling it at the initialization of the app, the remote suggestions provider is still in State::NOT_INITED. As it is not initiated, the call returns immediately and the suggestions are not cleared.

I think the remote suggestions provider should store that it has been asked to be cleared and clear once it is initialized.
 

Comment 1 by fi...@chromium.org, Oct 23 2017

Labels: zine-triaged

Comment 2 by pkl@chromium.org, Oct 23 2017

Owner: gambard@chromium.org
Status: Assigned (was: Untriaged)
This sounds like a TODO for yourself, or is it not?
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4fe04d2940686bcaeafcf89e2d924face6177448

commit 4fe04d2940686bcaeafcf89e2d924face6177448
Author: Gauthier Ambard <gambard@chromium.org>
Date: Wed Oct 25 12:26:07 2017

Store ClearCachedSuggestions calls while not Initialized

If the RemoteSuggestionsProviderImpl receives a call to
ClearCachedSuggestions while it is not initialized, it drops it
silently.
This CL makes it store the call to clear the suggestions once it is
started.

Bug:  776733 
Change-Id: Ic980d0ed7a6c7a57dde7017a55f17bdccc6afc91
Reviewed-on: https://chromium-review.googlesource.com/730712
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511426}
[modify] https://crrev.com/4fe04d2940686bcaeafcf89e2d924face6177448/components/ntp_snippets/remote/remote_suggestions_provider_impl.cc
[modify] https://crrev.com/4fe04d2940686bcaeafcf89e2d924face6177448/components/ntp_snippets/remote/remote_suggestions_provider_impl.h
[modify] https://crrev.com/4fe04d2940686bcaeafcf89e2d924face6177448/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc

Labels: -Type-Bug Type-Task
Status: Fixed (was: Assigned)

Sign in to add a comment