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

Unified Diff: components/suggestions/suggestions_service.h

Issue 473123002: [Most Visited] Check for Sync state when using SuggestionsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new api Created 6 years, 4 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.h
diff --git a/components/suggestions/suggestions_service.h b/components/suggestions/suggestions_service.h
index 3aa03a0185db6ec39a072505c44a7d177048ab05..89bac5d04872aac0e30e9ff188f28d42bb33171f 100644
--- a/components/suggestions/suggestions_service.h
+++ b/components/suggestions/suggestions_service.h
@@ -19,6 +19,7 @@
#include "components/keyed_service/core/keyed_service.h"
#include "components/suggestions/image_manager.h"
#include "components/suggestions/proto/suggestions.pb.h"
+#include "components/suggestions/suggestions_utils.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "ui/gfx/image/image_skia.h"
#include "url/gurl.h"
@@ -68,8 +69,12 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// fetch request unless a pending one exists. To prevent multiple requests,
manzagop (departed) 2014/08/20 15:43:51 I guess we shouldn't issue a request in the serve
Mathieu 2014/08/20 18:41:29 Done. Reworded comment.
// we place all |callback|s in a queue and update them simultaneously when
// fetch request completes. Also posts a task to execute OnRequestTimeout
- // if the request hasn't completed in a given amount of time.
- void FetchSuggestionsData(ResponseCallback callback);
+ // if the request hasn't completed in a given amount of time. |sync_state|
+ // must be specified based on the current state of the system (see
+ // suggestions::GetSyncState). Callers should call this function again if
+ // sync state changes.
+ void FetchSuggestionsData(SyncState sync_state,
+ ResponseCallback callback);
// Similar to FetchSuggestionsData but doesn't post a task to execute
// OnDelaySinceFetch.

Powered by Google App Engine
This is Rietveld 408576698