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

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

Issue 196029: Simple fix of extension_l10n_util that allows folders in form ".some_name" to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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: chrome/browser/extensions/extension_l10n_util.cc
===================================================================
--- chrome/browser/extensions/extension_l10n_util.cc (revision 25456)
+++ chrome/browser/extensions/extension_l10n_util.cc (working copy)
@@ -30,7 +30,6 @@
}
}
-
bool AddLocale(const std::set<std::string>& chrome_locales,
const FilePath& locale_folder,
Extension* extension,
@@ -38,6 +37,11 @@
std::string* error) {
// Normalize underscores to hyphens because that's what our locale files use.
std::replace(locale_name->begin(), locale_name->end(), '_', '-');
+ // Accept name that starts with . but don't add it to the list of supported
+ // locales.
+ if (locale_name->find(".", 0) == 0) {
Aaron Boodman 2009/09/09 01:42:56 Nit: braces not needed.
Aaron Boodman 2009/09/09 01:42:56 Nit: second parameter unnecessary as 0 is the defa
+ return true;
+ }
if (chrome_locales.find(*locale_name) == chrome_locales.end()) {
// Fail if there is an extension locale that's not in the Chrome list.
*error = StringPrintf("Supplied locale %s is not supported.",
« no previous file with comments | « chrome/browser/extensions/extension_l10n_util.h ('k') | chrome/browser/extensions/extension_l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698