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

Unified Diff: chrome/browser/android/most_visited_sites.h

Issue 1770843002: SuggestionsService: implement SyncServiceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS Created 4 years, 9 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 | « no previous file | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/most_visited_sites.h
diff --git a/chrome/browser/android/most_visited_sites.h b/chrome/browser/android/most_visited_sites.h
index 33fdca54eeb2d1351652a93f709cf571f9a64efe..6324efd9760baa055e62cab6f383f33e90eb65ff 100644
--- a/chrome/browser/android/most_visited_sites.h
+++ b/chrome/browser/android/most_visited_sites.h
@@ -22,7 +22,7 @@
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/top_sites_observer.h"
#include "components/suggestions/proto/suggestions.pb.h"
-#include "components/sync_driver/sync_service_observer.h"
+#include "components/suggestions/suggestions_service.h"
#include "url/gurl.h"
namespace suggestions {
@@ -37,8 +37,7 @@ class PopularSites;
class Profile;
// Provides the list of most visited sites and their thumbnails to Java.
-class MostVisitedSites : public sync_driver::SyncServiceObserver,
- public history::TopSitesObserver,
+class MostVisitedSites : public history::TopSitesObserver,
public SupervisedUserServiceObserver {
public:
explicit MostVisitedSites(Profile* profile);
@@ -68,9 +67,6 @@ class MostVisitedSites : public sync_driver::SyncServiceObserver,
jint index,
jint tile_type);
- // sync_driver::SyncServiceObserver implementation.
- void OnStateChanged() override;
-
// SupervisedUserServiceObserver implementation.
void OnURLFilterChanged() override;
@@ -178,7 +174,8 @@ class MostVisitedSites : public sync_driver::SyncServiceObserver,
SuggestionsVector* src_suggestions,
SuggestionsVector* dst_suggestions);
- // Notify the Java side observer about the availability of Most Visited Urls.
+ // Notifies the Java side observer about the availability of suggestions.
+ // Also records impressions UMA if not done already.
void NotifyMostVisitedURLsObserver();
void OnPopularSitesAvailable(bool success);
@@ -229,6 +226,10 @@ class MostVisitedSites : public sync_driver::SyncServiceObserver,
// recorded once both the previous flags are true.
bool recorded_uma_;
+ scoped_ptr<
+ suggestions::SuggestionsService::ResponseCallbackList::Subscription>
+ suggestions_subscription_;
+
ScopedObserver<history::TopSites, history::TopSitesObserver> scoped_observer_;
MostVisitedSource mv_source_;
« no previous file with comments | « no previous file | chrome/browser/android/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698