OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/common/debug_flags.h" | 5 #include "chrome/common/debug_flags.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 if (value.empty() || | 22 if (value.empty() || |
23 (type == ChildProcessInfo::WORKER_PROCESS && | 23 (type == ChildProcessInfo::WORKER_PROCESS && |
24 value == switches::kWorkerProcess) || | 24 value == switches::kWorkerProcess) || |
25 (type == ChildProcessInfo::RENDER_PROCESS && | 25 (type == ChildProcessInfo::RENDER_PROCESS && |
26 value == switches::kRendererProcess) || | 26 value == switches::kRendererProcess) || |
27 (type == ChildProcessInfo::PLUGIN_PROCESS && | 27 (type == ChildProcessInfo::PLUGIN_PROCESS && |
28 value == switches::kPluginProcess)) { | 28 value == switches::kPluginProcess)) { |
29 command_line->AppendSwitch(switches::kDebugOnStart); | 29 command_line->AppendSwitch(switches::kDebugOnStart); |
30 should_help_child = true; | 30 should_help_child = true; |
31 } | 31 } |
32 command_line->AppendSwitchWithValue(switches::kDebugChildren, value); | 32 command_line->AppendSwitchASCII(switches::kDebugChildren, value); |
33 } else if (current_cmd_line.HasSwitch(switches::kWaitForDebuggerChildren)) { | 33 } else if (current_cmd_line.HasSwitch(switches::kWaitForDebuggerChildren)) { |
34 // Look to pass-on the kWaitForDebugger flag. | 34 // Look to pass-on the kWaitForDebugger flag. |
35 std::string value = current_cmd_line.GetSwitchValueASCII( | 35 std::string value = current_cmd_line.GetSwitchValueASCII( |
36 switches::kWaitForDebuggerChildren); | 36 switches::kWaitForDebuggerChildren); |
37 if (value.empty() || | 37 if (value.empty() || |
38 (type == ChildProcessInfo::WORKER_PROCESS && | 38 (type == ChildProcessInfo::WORKER_PROCESS && |
39 value == switches::kWorkerProcess) || | 39 value == switches::kWorkerProcess) || |
40 (type == ChildProcessInfo::RENDER_PROCESS && | 40 (type == ChildProcessInfo::RENDER_PROCESS && |
41 value == switches::kRendererProcess) || | 41 value == switches::kRendererProcess) || |
42 (type == ChildProcessInfo::PLUGIN_PROCESS && | 42 (type == ChildProcessInfo::PLUGIN_PROCESS && |
43 value == switches::kPluginProcess)) { | 43 value == switches::kPluginProcess)) { |
44 command_line->AppendSwitch(switches::kWaitForDebugger); | 44 command_line->AppendSwitch(switches::kWaitForDebugger); |
45 } | 45 } |
46 command_line->AppendSwitchWithValue(switches::kWaitForDebuggerChildren, | 46 command_line->AppendSwitchASCII(switches::kWaitForDebuggerChildren, value); |
47 value); | |
48 } | 47 } |
49 return should_help_child; | 48 return should_help_child; |
50 } | 49 } |
OLD | NEW |