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

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

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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/sandbox_policy.h" 5 #include "chrome/browser/sandbox_policy.h"
6 6
7 #include "app/win_util.h" 7 #include "app/win_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug_util.h" 9 #include "base/debug_util.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 base::ProcessHandle StartProcess(CommandLine* cmd_line) { 331 base::ProcessHandle StartProcess(CommandLine* cmd_line) {
332 return StartProcessWithAccess(cmd_line, FilePath()); 332 return StartProcessWithAccess(cmd_line, FilePath());
333 } 333 }
334 334
335 base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, 335 base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
336 const FilePath& exposed_dir) { 336 const FilePath& exposed_dir) {
337 base::ProcessHandle process = 0; 337 base::ProcessHandle process = 0;
338 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 338 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
339 ChildProcessInfo::ProcessType type; 339 ChildProcessInfo::ProcessType type;
340 std::wstring type_str = cmd_line->GetSwitchValue(switches::kProcessType); 340 std::string type_str = cmd_line->GetSwitchValueASCII(switches::kProcessType);
341 if (type_str == switches::kRendererProcess) { 341 if (type_str == switches::kRendererProcess) {
342 type = ChildProcessInfo::RENDER_PROCESS; 342 type = ChildProcessInfo::RENDER_PROCESS;
343 } else if (type_str == switches::kPluginProcess) { 343 } else if (type_str == switches::kPluginProcess) {
344 type = ChildProcessInfo::PLUGIN_PROCESS; 344 type = ChildProcessInfo::PLUGIN_PROCESS;
345 } else if (type_str == switches::kWorkerProcess) { 345 } else if (type_str == switches::kWorkerProcess) {
346 type = ChildProcessInfo::WORKER_PROCESS; 346 type = ChildProcessInfo::WORKER_PROCESS;
347 } else if (type_str == switches::kNaClProcess) { 347 } else if (type_str == switches::kNaClProcess) {
348 type = ChildProcessInfo::NACL_PROCESS; 348 type = ChildProcessInfo::NACL_PROCESS;
349 } else if (type_str == switches::kUtilityProcess) { 349 } else if (type_str == switches::kUtilityProcess) {
350 type = ChildProcessInfo::UTILITY_PROCESS; 350 type = ChildProcessInfo::UTILITY_PROCESS;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 // Help the process a little. It can't start the debugger by itself if 435 // Help the process a little. It can't start the debugger by itself if
436 // the process is in a sandbox. 436 // the process is in a sandbox.
437 if (child_needs_help) 437 if (child_needs_help)
438 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId); 438 DebugUtil::SpawnDebuggerOnProcess(target.dwProcessId);
439 439
440 return process; 440 return process;
441 } 441 }
442 442
443 } // namespace sandbox 443 } // namespace sandbox
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_plugin_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698