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

Unified Diff: components/search_engines/template_url_prepopulate_data.h

Issue 2347973002: Enable Chrome to tweak search engines for some locales (Closed)
Patch Set: 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..52474eb33654d6f6fd444aad198e8000ca68202b 100644
--- a/components/search_engines/template_url_prepopulate_data.h
+++ b/components/search_engines/template_url_prepopulate_data.h
@@ -35,13 +35,23 @@ 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. If the given locale is the same as the existing locale, return
Peter Kasting 2016/09/23 01:28:36 Nit: returns
Ian Wen 2016/09/23 22:01:57 Done.
+// an empty vector.
+std::vector<std::unique_ptr<TemplateURLData>> GetLocalPrepopulatedEngines(
+ 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