Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: components/search_engines/template_url_service.h

Issue 2347973002: Enable Chrome to tweak search engines for some locales (Closed)
Patch Set: final nits Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_TEMPLATE_URL_SERVICE_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // need a raw pointer to the TemplateURL so they can access it later.) 171 // need a raw pointer to the TemplateURL so they can access it later.)
172 TemplateURL* Add(std::unique_ptr<TemplateURL> template_url); 172 TemplateURL* Add(std::unique_ptr<TemplateURL> template_url);
173 173
174 // Like Add(), but overwrites the |template_url|'s values with the provided 174 // Like Add(), but overwrites the |template_url|'s values with the provided
175 // ones. 175 // ones.
176 TemplateURL* AddWithOverrides(std::unique_ptr<TemplateURL> template_url, 176 TemplateURL* AddWithOverrides(std::unique_ptr<TemplateURL> template_url,
177 const base::string16& short_name, 177 const base::string16& short_name,
178 const base::string16& keyword, 178 const base::string16& keyword,
179 const std::string& url); 179 const std::string& url);
180 180
181 // Adds a search engine with the specified info. 181 // Adds a search engine with the specified info for extensions.
182 TemplateURL* AddExtensionControlledTURL( 182 TemplateURL* AddExtensionControlledTURL(
183 std::unique_ptr<TemplateURL> template_url, 183 std::unique_ptr<TemplateURL> template_url,
184 std::unique_ptr<TemplateURL::AssociatedExtensionInfo> info); 184 std::unique_ptr<TemplateURL::AssociatedExtensionInfo> info);
185 185
186 // Removes the keyword from the model. This deletes the supplied TemplateURL. 186 // Removes the keyword from the model. This deletes the supplied TemplateURL.
187 // This fails if the supplied template_url is the default search provider. 187 // This fails if the supplied template_url is the default search provider.
188 void Remove(TemplateURL* template_url); 188 void Remove(TemplateURL* template_url);
189 189
190 // Removes any TemplateURL of the specified |type| associated with 190 // Removes any TemplateURL of the specified |type| associated with
191 // |extension_id|. Unlike with Remove(), this can be called when the 191 // |extension_id|. Unlike with Remove(), this can be called when the
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 // Helper class to manage the default search engine. 813 // Helper class to manage the default search engine.
814 DefaultSearchManager default_search_manager_; 814 DefaultSearchManager default_search_manager_;
815 815
816 std::unique_ptr<GoogleURLTracker::Subscription> 816 std::unique_ptr<GoogleURLTracker::Subscription>
817 google_url_updated_subscription_; 817 google_url_updated_subscription_;
818 818
819 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 819 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
820 }; 820 };
821 821
822 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 822 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698