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

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

Issue 845013002: Remove TopSites notification in favor of Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « chrome/browser/chrome_notification_types.h ('k') | 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 c9cc6284d5287ed67a347060d874ac91bbc4cebb..2d41937b76afe878c3a345ff7e83a67353e0fb45 100644
--- a/chrome/browser/history/chrome_history_client.h
+++ b/chrome/browser/history/chrome_history_client.h
@@ -7,7 +7,6 @@
#include "base/macros.h"
#include "components/history/core/browser/history_client.h"
-#include "components/history/core/browser/top_sites_observer.h"
class HistoryService;
class Profile;
@@ -16,18 +15,11 @@ namespace bookmarks {
class BookmarkModel;
}
-namespace history {
-class TopSites;
-}
-
// This class implements history::HistoryClient to abstract operations that
// depend on Chrome environment.
-class ChromeHistoryClient : public history::HistoryClient,
- public history::TopSitesObserver {
+class ChromeHistoryClient : public history::HistoryClient {
public:
- explicit ChromeHistoryClient(bookmarks::BookmarkModel* bookmark_model,
- Profile* profile,
- history::TopSites* top_sites);
+ explicit ChromeHistoryClient(bookmarks::BookmarkModel* bookmark_model);
~ChromeHistoryClient() override;
// history::HistoryClient:
@@ -40,25 +32,9 @@ class ChromeHistoryClient : public history::HistoryClient,
// KeyedService:
void Shutdown() override;
- // TopSitesObserver:
- void TopSitesLoaded(history::TopSites* top_sites) override;
- void TopSitesChanged(history::TopSites* top_sites) override;
-
private:
// The BookmarkModel, this should outlive ChromeHistoryClient.
bookmarks::BookmarkModel* bookmark_model_;
- Profile* profile_;
- // The TopSites object is owned by the Profile (see
- // chrome/browser/profiles/profile_impl.h)
- // and lazily constructed by the getter.
- // ChromeHistoryClient is a KeyedService linked to the Profile lifetime by the
- // ChromeHistoryClientFactory (which is a BrowserContextKeyedServiceFactory).
- // Before the Profile is destroyed, all the KeyedService Shutdown methods are
- // called, and the Profile is fully constructed before any of the KeyedService
- // can be constructed. The TopSites does not use the HistoryService nor the
- // HistoryClient during construction (it uses it later, but supports getting
- // an NULL pointer).
- history::TopSites* top_sites_;
DISALLOW_COPY_AND_ASSIGN(ChromeHistoryClient);
};
« no previous file with comments | « chrome/browser/chrome_notification_types.h ('k') | chrome/browser/history/chrome_history_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698