summaryrefslogtreecommitdiffstats
path: root/chrome/common/debug_flags.h
blob: 9d4ebbaf3f62a0cd7de71d0620fd25f9f1ffc9a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_COMMON_DEBUG_FLAGS_H__
#define CHROME_COMMON_DEBUG_FLAGS_H__

#include <string>

class DebugFlags {
 public:
  enum ChildProcessType {
    RENDERER,
    PLUGIN,
    UNKNOWN
  };

  // Updates the command line arguments with debug-related flags. If debug flags
  // have been used with this process, they will be filtered and added to
  // command_line as needed. is_in_sandbox must be true if the child process will
  // be in a sandbox.
  // Returns true if the caller should "help" the child process by calling the JIT
  // debugger on it. It may only happen if is_in_sandbox is true.
  static bool ProcessDebugFlags(std::wstring* command_line,
                                ChildProcessType type,
                                bool is_in_sandbox);
};

#endif  // CHROME_COMMON_DEBUG_FLAGS_H__