| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| 7 |
| 8 #include "chrome/browser/search_engines/template_url_service_client.h" |
| 9 #include "content/public/browser/notification_observer.h" |
| 10 #include "content/public/browser/notification_registrar.h" |
| 11 |
| 12 class HistoryService; |
| 13 class Profile; |
| 14 |
| 15 // ChromeTemplateURLServiceClient provides keyword related history |
| 16 // functionality for TemplateURLService. |
| 17 class ChromeTemplateURLServiceClient : public TemplateURLServiceClient, |
| 18 public content::NotificationObserver { |
| 19 public: |
| 20 explicit ChromeTemplateURLServiceClient(Profile* profile); |
| 21 virtual ~ChromeTemplateURLServiceClient(); |
| 22 |
| 23 // TemplateURLServiceClient: |
| 24 virtual void SetOwner(TemplateURLService* owner) OVERRIDE; |
| 25 virtual void DeleteAllSearchTermsForKeyword( |
| 26 history::KeywordID keyword_Id) OVERRIDE; |
| 27 virtual void SetKeywordSearchTermsForURL(const GURL& url, |
| 28 TemplateURLID id, |
| 29 const base::string16& term) OVERRIDE; |
| 30 virtual void AddKeywordGeneratedVisit(const GURL& url) OVERRIDE; |
| 31 |
| 32 // content::NotificationObserver: |
| 33 virtual void Observe(int type, |
| 34 const content::NotificationSource& source, |
| 35 const content::NotificationDetails& details) OVERRIDE; |
| 36 |
| 37 private: |
| 38 Profile* profile_; |
| 39 TemplateURLService* owner_; |
| 40 content::NotificationRegistrar notification_registrar_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(ChromeTemplateURLServiceClient); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_SEARCH_ENGINES_CHROME_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| OLD | NEW |