| 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 COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ | |
| 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ | |
| 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 | |
| 21 // Sets the pointer to the owner of this object. | |
| 22 virtual void SetOwner(TemplateURLService* owner) = 0; | |
| 23 | |
| 24 // Deletes all search terms for the specified keyword. | |
| 25 virtual void DeleteAllSearchTermsForKeyword(TemplateURLID id) = 0; | |
| 26 | |
| 27 // Sets the search terms for the specified url and keyword. | |
| 28 virtual void SetKeywordSearchTermsForURL(const GURL& url, | |
| 29 TemplateURLID id, | |
| 30 const base::string16& term) = 0; | |
| 31 | |
| 32 // Adds the given URL to history as a keyword generated visit. | |
| 33 virtual void AddKeywordGeneratedVisit(const GURL& url) = 0; | |
| 34 }; | |
| 35 | |
| 36 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_ | |
| OLD | NEW |