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 COMPONENTS_SEARCH_ENGINES_UTIL_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_UTIL_H_ |
6 #define COMPONENTS_SEARCH_ENGINES_UTIL_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_UTIL_H_ |
7 | 7 |
8 // This file contains utility functions for search engine functionality. | 8 // This file contains utility functions for search engine functionality. |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "components/search_engines/template_url_service.h" | 15 #include "components/search_engines/template_url_service.h" |
16 | 16 |
| 17 template <typename T> |
| 18 class ScopedVector; |
| 19 |
17 class KeywordWebDataService; | 20 class KeywordWebDataService; |
18 class PrefService; | 21 class PrefService; |
19 class TemplateURL; | 22 class TemplateURL; |
20 class WDTypedResult; | 23 class WDTypedResult; |
21 | 24 |
22 // Returns the short name of the default search engine, or the empty string if | 25 // Returns the short name of the default search engine, or the empty string if |
23 // none is set. | 26 // none is set. |
24 base::string16 GetDefaultSearchEngineName(TemplateURLService* service); | 27 base::string16 GetDefaultSearchEngineName(TemplateURLService* service); |
25 | 28 |
26 // Returns a GURL that searches for |terms| using the default search engine of | 29 // Returns a GURL that searches for |terms| using the default search engine of |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // so it's accessible by unittests. | 130 // so it's accessible by unittests. |
128 void RemoveDuplicatePrepopulateIDs( | 131 void RemoveDuplicatePrepopulateIDs( |
129 KeywordWebDataService* service, | 132 KeywordWebDataService* service, |
130 const ScopedVector<TemplateURLData>& prepopulated_urls, | 133 const ScopedVector<TemplateURLData>& prepopulated_urls, |
131 TemplateURL* default_search_provider, | 134 TemplateURL* default_search_provider, |
132 TemplateURLService::TemplateURLVector* template_urls, | 135 TemplateURLService::TemplateURLVector* template_urls, |
133 const SearchTermsData& search_terms_data, | 136 const SearchTermsData& search_terms_data, |
134 std::set<std::string>* removed_keyword_guids); | 137 std::set<std::string>* removed_keyword_guids); |
135 | 138 |
136 #endif // COMPONENTS_SEARCH_ENGINES_UTIL_H_ | 139 #endif // COMPONENTS_SEARCH_ENGINES_UTIL_H_ |
OLD | NEW |