[email protected] | 7e31042 | 2014-07-03 12:44:45 | [diff] [blame] | 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 | |
[email protected] | bf5c532d | 2014-07-05 00:29:53 | [diff] [blame] | 5 | #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |
| 6 | #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |
[email protected] | 7e31042 | 2014-07-03 12:44:45 | [diff] [blame] | 7 | |
| 8 | #include "base/strings/string16.h" |
| 9 | #include "components/search_engines/template_url_id.h" |
| 10 | |
| 11 | class GURL; |
| 12 | class TemplateURLService; |
| 13 | |
| 14 | // This interface provides history related functionality required by |
| 15 | // TemplateURLService. |
| 16 | // TODO(hashimoto): Get rid of this once HistoryService gets componentized. |
| 17 | class TemplateURLServiceClient { |
| 18 | public: |
| 19 | virtual ~TemplateURLServiceClient() {} |
| 20 | |
sdefresne | bb1e575 | 2014-10-20 12:31:17 | [diff] [blame] | 21 | // Called by TemplateURLService::Shutdown as part of the two phase shutdown |
| 22 | // of the KeyedService. |
| 23 | virtual void Shutdown() = 0; |
| 24 | |
[email protected] | 7e31042 | 2014-07-03 12:44:45 | [diff] [blame] | 25 | // Sets the pointer to the owner of this object. |
| 26 | virtual void SetOwner(TemplateURLService* owner) = 0; |
| 27 | |
| 28 | // Deletes all search terms for the specified keyword. |
| 29 | virtual void DeleteAllSearchTermsForKeyword(TemplateURLID id) = 0; |
| 30 | |
| 31 | // Sets the search terms for the specified url and keyword. |
| 32 | virtual void SetKeywordSearchTermsForURL(const GURL& url, |
| 33 | TemplateURLID id, |
| 34 | const base::string16& term) = 0; |
| 35 | |
| 36 | // Adds the given URL to history as a keyword generated visit. |
| 37 | virtual void AddKeywordGeneratedVisit(const GURL& url) = 0; |
| 38 | }; |
| 39 | |
[email protected] | bf5c532d | 2014-07-05 00:29:53 | [diff] [blame] | 40 | #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ |