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

Unified Diff: chrome/common/extensions/extension_l10n_util.cc

Issue 10821068: Revert 148720 - [Web Intents] Localization of intent titles for CWS suggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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: chrome/common/extensions/extension_l10n_util.cc
===================================================================
--- chrome/common/extensions/extension_l10n_util.cc (revision 148750)
+++ chrome/common/extensions/extension_l10n_util.cc (working copy)
@@ -237,15 +237,6 @@
}
}
-void GetAllFallbackLocales(const std::string& application_locale,
- const std::string& default_locale,
- std::vector<std::string>* all_fallback_locales) {
- DCHECK(all_fallback_locales);
- if (!application_locale.empty() && application_locale != default_locale)
- l10n_util::GetParentLocales(application_locale, all_fallback_locales);
- all_fallback_locales->push_back(default_locale);
-}
-
bool GetValidLocales(const FilePath& locale_path,
std::set<std::string>* valid_locales,
std::string* error) {
@@ -307,9 +298,11 @@
const std::string& application_locale,
const std::set<std::string>& valid_locales,
std::string* error) {
+ // Order locales to load as current_locale, first_parent, ..., default_locale.
std::vector<std::string> all_fallback_locales;
- GetAllFallbackLocales(application_locale, default_locale,
- &all_fallback_locales);
+ if (!application_locale.empty() && application_locale != default_locale)
+ l10n_util::GetParentLocales(application_locale, &all_fallback_locales);
+ all_fallback_locales.push_back(default_locale);
std::vector<linked_ptr<DictionaryValue> > catalogs;
for (size_t i = 0; i < all_fallback_locales.size(); ++i) {
« no previous file with comments | « chrome/common/extensions/extension_l10n_util.h ('k') | chrome/common/extensions/extension_l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698