| OLD | NEW |
| 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_TEMPLATE_URL_SERVICE_CLIENT_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "components/search_engines/template_url_id.h" | 9 #include "components/search_engines/template_url_id.h" |
| 10 | 10 |
| 11 class GURL; | 11 class GURL; |
| 12 class TemplateURLService; | 12 class TemplateURLService; |
| 13 | 13 |
| 14 // This interface provides history related functionality required by | 14 // This interface provides history related functionality required by |
| 15 // TemplateURLService. | 15 // TemplateURLService. |
| 16 // TODO(hashimoto): Get rid of this once HistoryService gets componentized. | 16 // TODO(hashimoto): Get rid of this once HistoryService gets componentized. |
| 17 class TemplateURLServiceClient { | 17 class TemplateURLServiceClient { |
| 18 public: | 18 public: |
| 19 virtual ~TemplateURLServiceClient() {} | 19 virtual ~TemplateURLServiceClient() {} |
| 20 | 20 |
| 21 // Sets the pointer to the owner of this object. | 21 // Sets the pointer to the owner of this object. |
| 22 virtual void SetOwner(TemplateURLService* owner) = 0; | 22 virtual void SetOwner(TemplateURLService* owner) = 0; |
| 23 | 23 |
| 24 // Deletes all search terms for the specified keyword. | 24 // Deletes all search terms for the specified keyword. |
| 25 virtual void DeleteAllSearchTermsForKeyword(TemplateURLID id) = 0; | 25 virtual void DeleteAllSearchTermsForKeyword(TemplateURLID id) = 0; |
| 26 | 26 |
| 27 // Sets the search terms for the specified url and keyword. | 27 // Sets the search terms for the specified url and keyword. |
| 28 virtual void SetKeywordSearchTermsForURL(const GURL& url, | 28 virtual void SetKeywordSearchTermsForURL(const GURL& url, |
| 29 TemplateURLID id, | 29 TemplateURLID id, |
| 30 const base::string16& term) = 0; | 30 const base::string16& term) = 0; |
| 31 | 31 |
| 32 // Adds the given URL to history as a keyword generated visit. | 32 // Adds the given URL to history as a keyword generated visit. |
| 33 virtual void AddKeywordGeneratedVisit(const GURL& url) = 0; | 33 virtual void AddKeywordGeneratedVisit(const GURL& url) = 0; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ | 36 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| OLD | NEW |