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

Unified Diff: chrome/browser/search_engines/chrome_template_url_service_client.h

Issue 651193002: Remove NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326.2
Patch Set: Rebase, address comments, fix tests and compilation Created 6 years, 2 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: chrome/browser/search_engines/chrome_template_url_service_client.h
diff --git a/chrome/browser/search_engines/chrome_template_url_service_client.h b/chrome/browser/search_engines/chrome_template_url_service_client.h
index 9bfe2ef7b74346cb14d0d02d7bbec6e8b2d52205..877e5adefbbceaaeae2c6c442811e2611f78b06e 100644
--- a/chrome/browser/search_engines/chrome_template_url_service_client.h
+++ b/chrome/browser/search_engines/chrome_template_url_service_client.h
@@ -5,22 +5,21 @@
#ifndef CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_
#define CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_
+#include "components/history/core/browser/history_service_observer.h"
#include "components/search_engines/template_url_service_client.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
class HistoryService;
-class Profile;
// ChromeTemplateURLServiceClient provides keyword related history
// functionality for TemplateURLService.
class ChromeTemplateURLServiceClient : public TemplateURLServiceClient,
- public content::NotificationObserver {
+ public history::HistoryServiceObserver {
public:
- explicit ChromeTemplateURLServiceClient(Profile* profile);
+ explicit ChromeTemplateURLServiceClient(HistoryService* history_service);
virtual ~ChromeTemplateURLServiceClient();
// TemplateURLServiceClient:
+ virtual void Shutdown() override;
virtual void SetOwner(TemplateURLService* owner) override;
virtual void DeleteAllSearchTermsForKeyword(
history::KeywordID keyword_Id) override;
@@ -31,15 +30,16 @@ class ChromeTemplateURLServiceClient : public TemplateURLServiceClient,
virtual void RestoreExtensionInfoIfNecessary(
TemplateURL* template_url) override;
- // content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ // history::HistoryServiceObserver:
+ virtual void OnURLVisited(HistoryService* history_service,
+ ui::PageTransition transition,
+ const history::URLRow& row,
+ const history::RedirectList& redirects,
+ base::Time visit_time) override;
private:
- Profile* profile_;
TemplateURLService* owner_;
- content::NotificationRegistrar notification_registrar_;
+ HistoryService* history_service_;
DISALLOW_COPY_AND_ASSIGN(ChromeTemplateURLServiceClient);
};

Powered by Google App Engine
This is Rietveld 408576698