From c10cf58384d2808c13808fee0352573bb6069781 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Tue, 27 Oct 2009 23:29:49 +0000 Subject: 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 --- chrome/utility/utility_main.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'chrome/utility') 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; -- cgit v1.1