RemoteSuggestionsProviderImpl::ClearCachedSuggestions does nothing if RemoteSuggestionsProviderImpl is not initiated |
|||
Issue descriptionI 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.
,
Oct 23 2017
This sounds like a TODO for yourself, or is it not?
,
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
,
Oct 25 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by fi...@chromium.org
, Oct 23 2017