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

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

Issue 337041: Fix bug where many extensions don't install due to sandbox. (Closed)
Patch Set: Attempt to fix a deps issue Created 11 years, 2 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.h
diff --git a/chrome/browser/extensions/extension_l10n_util.h b/chrome/common/extensions/extension_l10n_util.h
similarity index 87%
rename from chrome/browser/extensions/extension_l10n_util.h
rename to chrome/common/extensions/extension_l10n_util.h
index 07be73e158e52a2058406d4bc08035d2b6c8ec9a..87ad43f2464151e1f6ea0fbe87d7e246c2fb90ee 100644
--- a/chrome/browser/extensions/extension_l10n_util.h
+++ b/chrome/common/extensions/extension_l10n_util.h
@@ -4,8 +4,8 @@
//
// This file declares extension specific l10n utils.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_L10N_UTIL_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_L10N_UTIL_H_
+#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
+#define CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_
#include <set>
#include <string>
@@ -18,6 +18,11 @@ class FilePath;
namespace extension_l10n_util {
+// Set the locale for this process to a fixed value, rather than using the
+// normal file-based lookup mechanisms. This is used to set the locale inside
+// the sandboxed utility process, where file reading is not allowed.
+void SetProcessLocale(const std::string& locale);
+
// Returns default locale in form "en-US" or "sr" or empty string if
// "default_locale" section was not defined in the manifest.json file.
std::string GetDefaultLocaleFromManifest(const DictionaryValue& manifest,
@@ -74,4 +79,4 @@ void GetL10nRelativePaths(const FilePath& relative_resource_path,
} // namespace extension_l10n_util
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_L10N_UTIL_H_
+#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_L10N_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698