blob: 21a1f2400a84ac12f50e04e2e5950b8db3f40065 [file] [log] [blame]
[email protected]7e310422014-07-03 12:44:451// 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]bf5c532d2014-07-05 00:29:535#ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_
6#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_
[email protected]7e310422014-07-03 12:44:457
8#include "base/strings/string16.h"
9#include "components/search_engines/template_url_id.h"
10
11class GURL;
12class TemplateURLService;
13
14// This interface provides history related functionality required by
15// TemplateURLService.
16// TODO(hashimoto): Get rid of this once HistoryService gets componentized.
17class TemplateURLServiceClient {
18 public:
19 virtual ~TemplateURLServiceClient() {}
20
sdefresnebb1e5752014-10-20 12:31:1721 // Called by TemplateURLService::Shutdown as part of the two phase shutdown
22 // of the KeyedService.
23 virtual void Shutdown() = 0;
24
[email protected]7e310422014-07-03 12:44:4525 // 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]bf5c532d2014-07-05 00:29:5340#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_