OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/common/debug_flags.h" | 5 #include "content/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 "content/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
11 #include "ipc/ipc_switches.h" | 11 #include "ipc/ipc_switches.h" |
12 | 12 |
13 bool DebugFlags::ProcessDebugFlags(CommandLine* command_line, | 13 bool DebugFlags::ProcessDebugFlags(CommandLine* command_line, |
14 ChildProcessInfo::ProcessType type, | 14 ChildProcessInfo::ProcessType type, |
15 bool is_in_sandbox) { | 15 bool is_in_sandbox) { |
16 bool should_help_child = false; | 16 bool should_help_child = false; |
17 const CommandLine& current_cmd_line = *CommandLine::ForCurrentProcess(); | 17 const CommandLine& current_cmd_line = *CommandLine::ForCurrentProcess(); |
18 if (current_cmd_line.HasSwitch(switches::kDebugChildren)) { | 18 if (current_cmd_line.HasSwitch(switches::kDebugChildren)) { |
19 // Look to pass-on the kDebugOnStart flag. | 19 // Look to pass-on the kDebugOnStart flag. |
20 std::string value = current_cmd_line.GetSwitchValueASCII( | 20 std::string value = current_cmd_line.GetSwitchValueASCII( |
(...skipping 19 matching lines...) Expand all Loading... |
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->AppendSwitchASCII(switches::kWaitForDebuggerChildren, value); | 46 command_line->AppendSwitchASCII(switches::kWaitForDebuggerChildren, value); |
47 } | 47 } |
48 return should_help_child; | 48 return should_help_child; |
49 } | 49 } |
OLD | NEW |