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

Side by Side Diff: chrome/browser/utility_process_host.cc

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, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/utility_process_host.h" 5 #include "chrome/browser/utility_process_host.h"
6 6
7 #include "app/app_switches.h"
8 #include "app/l10n_util.h"
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/file_util.h" 10 #include "base/file_util.h"
9 #include "base/message_loop.h" 11 #include "base/message_loop.h"
10 #include "base/path_service.h" 12 #include "base/path_service.h"
11 #include "base/process_util.h" 13 #include "base/process_util.h"
12 #include "base/string_util.h" 14 #include "base/string_util.h"
13 #include "base/task.h" 15 #include "base/task.h"
14 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/render_messages.h" 17 #include "chrome/common/render_messages.h"
16 #include "ipc/ipc_switches.h" 18 #include "ipc/ipc_switches.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (exe_path.empty()) { 84 if (exe_path.empty()) {
83 NOTREACHED() << "Unable to get utility process binary name."; 85 NOTREACHED() << "Unable to get utility process binary name.";
84 return false; 86 return false;
85 } 87 }
86 88
87 CommandLine cmd_line(exe_path); 89 CommandLine cmd_line(exe_path);
88 cmd_line.AppendSwitchWithValue(switches::kProcessType, 90 cmd_line.AppendSwitchWithValue(switches::kProcessType,
89 switches::kUtilityProcess); 91 switches::kUtilityProcess);
90 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, 92 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID,
91 ASCIIToWide(channel_id())); 93 ASCIIToWide(channel_id()));
94 // Pass on the browser locale.
95 std::string locale = l10n_util::GetApplicationLocale(L"");
96 cmd_line.AppendSwitchWithValue(switches::kLang, ASCIIToWide(locale));
97
92 SetCrashReporterCommandLine(&cmd_line); 98 SetCrashReporterCommandLine(&cmd_line);
93 99
94 base::ProcessHandle process; 100 base::ProcessHandle process;
95 #if defined(OS_WIN) 101 #if defined(OS_WIN)
96 if (!UseSandbox()) { 102 if (!UseSandbox()) {
97 // Don't use the sandbox during unit tests. 103 // Don't use the sandbox during unit tests.
98 base::LaunchApp(cmd_line, false, false, &process); 104 base::LaunchApp(cmd_line, false, false, &process);
99 } else if (exposed_dir.empty()) { 105 } else if (exposed_dir.empty()) {
100 process = sandbox::StartProcess(&cmd_line); 106 process = sandbox::StartProcess(&cmd_line);
101 } else { 107 } else {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Succeeded, 162 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Succeeded,
157 Client::OnUnpackWebResourceSucceeded) 163 Client::OnUnpackWebResourceSucceeded)
158 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Failed, 164 IPC_MESSAGE_HANDLER(UtilityHostMsg_UnpackWebResource_Failed,
159 Client::OnUnpackWebResourceFailed) 165 Client::OnUnpackWebResourceFailed)
160 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded, 166 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Succeeded,
161 Client::OnParseUpdateManifestSucceeded) 167 Client::OnParseUpdateManifestSucceeded)
162 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, 168 IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed,
163 Client::OnParseUpdateManifestFailed) 169 Client::OnParseUpdateManifestFailed)
164 IPC_END_MESSAGE_MAP_EX() 170 IPC_END_MESSAGE_MAP_EX()
165 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698