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

Unified Diff: components/search_engines/template_url_prepopulate_data.h

Issue 2347973002: Enable Chrome to tweak search engines for some locales (Closed)
Patch Set: fix compile Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/search_engines/template_url_prepopulate_data.h
diff --git a/components/search_engines/template_url_prepopulate_data.h b/components/search_engines/template_url_prepopulate_data.h
index 210a0f50f2345bf1ed88a0cf0d58767176ff8ff5..956814972873b8487eb74799954c8ad1687b71a9 100644
--- a/components/search_engines/template_url_prepopulate_data.h
+++ b/components/search_engines/template_url_prepopulate_data.h
@@ -35,13 +35,22 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
// file then it returns the version specified there.
int GetDataVersion(PrefService* prefs);
-// Loads the set of TemplateURLs from the prepopulate data. On return,
+// Returns the prepopulated URLs for the current country.
// |default_search_provider_index| is set to the index of the default search
-// provider.
+// provider within the returned vector.
std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
PrefService* prefs,
size_t* default_search_provider_index);
+#if defined(OS_ANDROID)
+// Returns the prepopulated URLs associated with |locale|, if it differs from
+// the current country. |locale| should be a two-character uppercase ISO 3166-1
+// country code.
+std::vector<std::unique_ptr<TemplateURLData>> GetLocalPrepopulatedEngines(
Peter Kasting 2016/09/21 21:45:08 Nit: The only thing I worry about with this functi
Ian Wen 2016/09/21 23:12:38 I added a clarification to make it more clear that
+ const std::string& locale,
+ PrefService* prefs);
+#endif
+
// Returns all prepopulated engines for all locales. Used only by tests.
std::vector<const PrepopulatedEngine*> GetAllPrepopulatedEngines();

Powered by Google App Engine
This is Rietveld 408576698