summaryrefslogtreecommitdiffstats
path: root/chrome/utility
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 23:29:49 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 23:29:49 +0000
commitc10cf58384d2808c13808fee0352573bb6069781 (patch)
treeeff79c3f08085544694d5f573364f182526c238d /chrome/utility
parent48abb0046f935690ea83d0290dc6ff0a60d99b27 (diff)
downloadchromium_src-c10cf58384d2808c13808fee0352573bb6069781.zip
chromium_src-c10cf58384d2808c13808fee0352573bb6069781.tar.gz
chromium_src-c10cf58384d2808c13808fee0352573bb6069781.tar.bz2
Fix bug where many extensions don't install due to sandbox.
FWIW, I tracked down why our tests didn't find this. We do have coverage for the code path that was getting executed, but the sandbox is disabled in our browser tests, so it did not expose this issue. BUG=25865 TEST=Install any extension that has a content script or icons (test/data/extensions/good.crx is one example). Go to chrome://extensions/. You should see the extension successfully installed. Review URL: http://codereview.chromium.org/337041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r--chrome/utility/utility_main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/utility/utility_main.cc b/chrome/utility/utility_main.cc
index bb669a7..b2eaa46 100644
--- a/chrome/utility/utility_main.cc
+++ b/chrome/utility/utility_main.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "app/app_switches.h"
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -9,6 +10,7 @@
#include "chrome/common/child_process.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/extension_l10n_util.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/main_function_params.h"
#include "chrome/utility/utility_thread.h"
@@ -39,6 +41,11 @@ int UtilityMain(const MainFunctionParams& parameters) {
target_services->LowerToken();
#endif
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ std::string lang = command_line->GetSwitchValueASCII(switches::kLang);
+ if (!lang.empty())
+ extension_l10n_util::SetProcessLocale(lang);
+
MessageLoop::current()->Run();
return 0;