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

Unified Diff: chrome/common/extensions/api/i18n/default_locale_handler.cc

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/api/i18n/default_locale_handler.cc
diff --git a/chrome/common/extensions/api/i18n/default_locale_handler.cc b/chrome/common/extensions/api/i18n/default_locale_handler.cc
index 363128fc0f256050b340625177ebdcbaa26d4ae3..3cae5fe2ed2820e1dc6dc2d5582dc918b6dcda2c 100644
--- a/chrome/common/extensions/api/i18n/default_locale_handler.cc
+++ b/chrome/common/extensions/api/i18n/default_locale_handler.cc
@@ -41,7 +41,7 @@ bool DefaultLocaleHandler::Parse(Extension* extension, string16* error) {
if (!extension->manifest()->GetString(keys::kDefaultLocale,
&info->default_locale) ||
!l10n_util::IsValidLocaleSyntax(info->default_locale)) {
- *error = ASCIIToUTF16(extension_manifest_errors::kInvalidDefaultLocale);
+ *error = ASCIIToUTF16(errors::kInvalidDefaultLocale);
return false;
}
extension->SetManifestData(keys::kDefaultLocale, info.release());
@@ -53,10 +53,10 @@ bool DefaultLocaleHandler::Validate(
std::string* error,
std::vector<InstallWarning>* warnings) const {
// default_locale and _locales have to be both present or both missing.
- const base::FilePath path = extension->path().Append(kLocaleFolder);
+ const base::FilePath path =
+ extension->path().Append(filenames::kLocaleFolder);
bool path_exists = base::PathExists(path);
- std::string default_locale =
- extensions::LocaleInfo::GetDefaultLocale(extension);
+ std::string default_locale = LocaleInfo::GetDefaultLocale(extension);
// If both default locale and _locales folder are empty, skip verification.
if (default_locale.empty() && !path_exists)
@@ -85,7 +85,8 @@ bool DefaultLocaleHandler::Validate(
all_locales))
continue;
- base::FilePath messages_path = locale_path.Append(kMessagesFilename);
+ base::FilePath messages_path =
+ locale_path.Append(filenames::kMessagesFilename);
if (!base::PathExists(messages_path)) {
*error = base::StringPrintf(

Powered by Google App Engine
This is Rietveld 408576698