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

Unified Diff: chrome/browser/history/chrome_history_client.h

Issue 441623002: Eliminate sending NOTIFICATION_TOP_SITES_* from TopSites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the commit message 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
« no previous file with comments | « no previous file | chrome/browser/history/chrome_history_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/chrome_history_client.h
diff --git a/chrome/browser/history/chrome_history_client.h b/chrome/browser/history/chrome_history_client.h
index 1a02506fb8ab437cbd147c4c26d5acc818eb197f..12442a09c206b1ffb534a6c2fc7bae6442e3113d 100644
--- a/chrome/browser/history/chrome_history_client.h
+++ b/chrome/browser/history/chrome_history_client.h
@@ -7,14 +7,24 @@
#include "base/macros.h"
#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/top_sites_observer.h"
class BookmarkModel;
+class Profile;
+
+namespace history {
+class TopSites;
+}
// This class implements history::HistoryClient to abstract operations that
// depend on Chrome environment.
-class ChromeHistoryClient : public history::HistoryClient {
+class ChromeHistoryClient : public history::HistoryClient,
+ public history::TopSitesObserver {
public:
- explicit ChromeHistoryClient(BookmarkModel* bookmark_model);
+ explicit ChromeHistoryClient(BookmarkModel* bookmark_model,
+ Profile* profile,
+ history::TopSites* top_sites);
+ virtual ~ChromeHistoryClient();
// history::HistoryClient:
virtual void BlockUntilBookmarksLoaded() OVERRIDE;
@@ -27,9 +37,15 @@ class ChromeHistoryClient : public history::HistoryClient {
// KeyedService:
virtual void Shutdown() OVERRIDE;
+ // TopSitesObserver:
+ virtual void TopSitesLoaded(history::TopSites* top_sites) OVERRIDE;
+ virtual void TopSitesChanged(history::TopSites* top_sites) OVERRIDE;
+
private:
// The BookmarkModel, this should outlive ChromeHistoryClient.
BookmarkModel* bookmark_model_;
+ Profile* profile_;
+ history::TopSites* top_sites_;
brettw 2014/08/19 22:51:58 Can you put a comment here like you did in the cod
nshaik 2014/08/20 18:31:35 Done.
DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
};
« no previous file with comments | « no previous file | chrome/browser/history/chrome_history_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698