Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Unified Diff: components/suggestions/suggestions_service_impl.cc

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/suggestions/suggestions_service_impl.cc
diff --git a/components/suggestions/suggestions_service_impl.cc b/components/suggestions/suggestions_service_impl.cc
index c6fa2383e4a4e40f7b2576d23d790783e64905ca..c16216bf57ffc2a101a99543d86c1bf030e7086e 100644
--- a/components/suggestions/suggestions_service_impl.cc
+++ b/components/suggestions/suggestions_service_impl.cc
@@ -160,7 +160,7 @@ SuggestionsServiceImpl::SuggestionsServiceImpl(
sync_service_observer_.Add(sync_service_);
// Immediately get the current sync state, so we'll flush the cache if
// necessary.
- OnStateChanged();
+ OnStateChanged(sync_service_);
}
SuggestionsServiceImpl::~SuggestionsServiceImpl() {}
@@ -299,7 +299,7 @@ GURL SuggestionsServiceImpl::BuildSuggestionsBlacklistClearURL() {
kDeviceType));
}
-void SuggestionsServiceImpl::OnStateChanged() {
+void SuggestionsServiceImpl::OnStateChanged(syncer::SyncService* sync) {
switch (GetSyncState(sync_service_)) {
case SYNC_OR_HISTORY_SYNC_DISABLED:
// Cancel any ongoing request, to stop interacting with the server.
« no previous file with comments | « components/suggestions/suggestions_service_impl.h ('k') | components/suggestions/suggestions_service_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698