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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_
7 7
8 #include "components/history/core/browser/history_service_observer.h"
8 #include "components/search_engines/template_url_service_client.h" 9 #include "components/search_engines/template_url_service_client.h"
9 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
droger 2014/10/14 15:15:24 Remove these includes.
sdefresne 2014/10/14 16:02:05 Done.
11 12
12 class HistoryService; 13 class HistoryService;
13 class Profile; 14 class Profile;
droger 2014/10/14 15:15:24 Remove.
sdefresne 2014/10/14 16:02:05 Done.
14 15
15 // ChromeTemplateURLServiceClient provides keyword related history 16 // ChromeTemplateURLServiceClient provides keyword related history
16 // functionality for TemplateURLService. 17 // functionality for TemplateURLService.
17 class ChromeTemplateURLServiceClient : public TemplateURLServiceClient, 18 class ChromeTemplateURLServiceClient : public TemplateURLServiceClient,
18 public content::NotificationObserver { 19 public history::HistoryServiceObserver {
19 public: 20 public:
20 explicit ChromeTemplateURLServiceClient(Profile* profile); 21 explicit ChromeTemplateURLServiceClient(HistoryService* history_service);
21 virtual ~ChromeTemplateURLServiceClient(); 22 virtual ~ChromeTemplateURLServiceClient();
22 23
23 // TemplateURLServiceClient: 24 // TemplateURLServiceClient:
24 virtual void SetOwner(TemplateURLService* owner) override; 25 virtual void SetOwner(TemplateURLService* owner) override;
25 virtual void DeleteAllSearchTermsForKeyword( 26 virtual void DeleteAllSearchTermsForKeyword(
26 history::KeywordID keyword_Id) override; 27 history::KeywordID keyword_Id) override;
27 virtual void SetKeywordSearchTermsForURL(const GURL& url, 28 virtual void SetKeywordSearchTermsForURL(const GURL& url,
28 TemplateURLID id, 29 TemplateURLID id,
29 const base::string16& term) override; 30 const base::string16& term) override;
30 virtual void AddKeywordGeneratedVisit(const GURL& url) override; 31 virtual void AddKeywordGeneratedVisit(const GURL& url) override;
31 virtual void RestoreExtensionInfoIfNecessary( 32 virtual void RestoreExtensionInfoIfNecessary(
32 TemplateURL* template_url) override; 33 TemplateURL* template_url) override;
33 34
34 // content::NotificationObserver: 35 // history::HistoryServiceObserver:
35 virtual void Observe(int type, 36 virtual void OnURLVisited(HistoryService* history_service,
36 const content::NotificationSource& source, 37 ui::PageTransition transition,
37 const content::NotificationDetails& details) override; 38 const history::URLRow& row,
39 const history::RedirectList& redirects,
40 base::Time visit_time) override;
droger 2014/10/14 15:15:24 You need includes or forward declarations for thes
sdefresne 2014/10/14 16:02:05 They are forward-declared / included in "component
droger 2014/10/14 16:11:09 Ok, you are probably right.
38 41
39 private: 42 private:
40 Profile* profile_;
41 TemplateURLService* owner_; 43 TemplateURLService* owner_;
42 content::NotificationRegistrar notification_registrar_; 44 HistoryService* history_service_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(ChromeTemplateURLServiceClient); 46 DISALLOW_COPY_AND_ASSIGN(ChromeTemplateURLServiceClient);
45 }; 47 };
46 48
47 #endif // CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ 49 #endif // CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698