| 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 #ifndef CHROME_COMMON_DEBUG_FLAGS_H__ | 5 #ifndef CHROME_COMMON_DEBUG_FLAGS_H__ |
| 6 #define CHROME_COMMON_DEBUG_FLAGS_H__ | 6 #define CHROME_COMMON_DEBUG_FLAGS_H__ |
| 7 | 7 |
| 8 #include "chrome/common/child_process_info.h" |
| 9 |
| 8 class CommandLine; | 10 class CommandLine; |
| 9 | 11 |
| 10 class DebugFlags { | 12 class DebugFlags { |
| 11 public: | 13 public: |
| 12 enum ChildProcessType { | 14 enum ChildProcessType { |
| 13 RENDERER, | 15 RENDERER, |
| 14 PLUGIN, | 16 PLUGIN, |
| 15 UNKNOWN | 17 UNKNOWN |
| 16 }; | 18 }; |
| 17 | 19 |
| 18 // Updates the command line arguments with debug-related flags. If | 20 // Updates the command line arguments with debug-related flags. If |
| 19 // debug flags have been used with this process, they will be | 21 // debug flags have been used with this process, they will be |
| 20 // filtered and added to command_line as needed. is_in_sandbox must | 22 // filtered and added to command_line as needed. is_in_sandbox must |
| 21 // be true if the child process will be in a sandbox. | 23 // be true if the child process will be in a sandbox. |
| 22 // | 24 // |
| 23 // Returns true if the caller should "help" the child process by | 25 // Returns true if the caller should "help" the child process by |
| 24 // calling the JIT debugger on it. It may only happen if | 26 // calling the JIT debugger on it. It may only happen if |
| 25 // is_in_sandbox is true. | 27 // is_in_sandbox is true. |
| 26 static bool ProcessDebugFlags(CommandLine* command_line, | 28 static bool ProcessDebugFlags(CommandLine* command_line, |
| 27 ChildProcessType type, | 29 ChildProcessInfo::ProcessType type, |
| 28 bool is_in_sandbox); | 30 bool is_in_sandbox); |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 #endif // CHROME_COMMON_DEBUG_FLAGS_H__ | 33 #endif // CHROME_COMMON_DEBUG_FLAGS_H__ |
| 32 | 34 |
| OLD | NEW |