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

Unified Diff: chrome/browser/search/suggestions/suggestions_source.cc

Issue 527943002: [Most Visited] Check for Sync state when using SuggestionsService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/android/most_visited_sites.cc ('k') | components/suggestions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/suggestions/suggestions_source.cc
diff --git a/chrome/browser/search/suggestions/suggestions_source.cc b/chrome/browser/search/suggestions/suggestions_source.cc
index aceabcce05a719c14e1ff1f4ee37707be5bc4344..a79589ad2995e64dfd7b5a9a29867cfbd967ebf2 100644
--- a/chrome/browser/search/suggestions/suggestions_source.cc
+++ b/chrome/browser/search/suggestions/suggestions_source.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/search/suggestions/suggestions_service_factory.h"
#include "chrome/common/url_constants.h"
#include "components/suggestions/suggestions_service.h"
+#include "components/suggestions/suggestions_utils.h"
#include "net/base/escape.h"
#include "ui/base/l10n/time_format.h"
#include "ui/gfx/codec/png_codec.h"
@@ -126,7 +127,10 @@ void SuggestionsSource::StartDataRequest(
return;
}
+ // Since it's a debugging page, it's fine to specify that sync state is
+ // initialized.
suggestions_service->FetchSuggestionsData(
+ INITIALIZED_ENABLED_HISTORY,
base::Bind(&SuggestionsSource::OnSuggestionsAvailable,
weak_ptr_factory_.GetWeakPtr(), callback));
}
« no previous file with comments | « chrome/browser/android/most_visited_sites.cc ('k') | components/suggestions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698