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

Side by Side Diff: chrome/common/child_process_logging.h

Issue 9432033: Add experiments info to crash dumps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Last Few Nits Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/child_process_logging_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHILD_PROCESS_LOGGING_H_ 5 #ifndef CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector>
11 12
12 #include "base/basictypes.h" 13 #include "base/basictypes.h"
13 #include "base/mac/crash_logging.h" 14 #include "base/mac/crash_logging.h"
15 #include "base/string16.h"
14 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
15 17
16 class CommandLine; 18 class CommandLine;
17 19
18 namespace content { 20 namespace content {
19 struct GPUInfo; 21 struct GPUInfo;
20 } 22 }
21 23
22 // The maximum number of active extensions we will report. 24 // The maximum number of active extensions we will report.
23 // Also used in chrome/app, but we define it here to avoid a common->app 25 // Also used in chrome/app, but we define it here to avoid a common->app
24 // dependency. 26 // dependency.
25 static const int kMaxReportedActiveExtensions = 10; 27 static const int kMaxReportedActiveExtensions = 10;
26 28
29 // The maximum number of experiment chunks we will report.
30 // Also used in chrome/app, but we define it here to avoid a common->app
31 // dependency.
32 static const int kMaxReportedExperimentChunks = 15;
33
27 // The maximum number of prn-info-* records. 34 // The maximum number of prn-info-* records.
28 static const size_t kMaxReportedPrinterRecords = 4; 35 static const size_t kMaxReportedPrinterRecords = 4;
29 36
30 // The maximum number of command line switches to include in the crash 37 // The maximum number of command line switches to include in the crash
31 // report's metadata. Note that the mini-dump itself will also contain the 38 // report's metadata. Note that the mini-dump itself will also contain the
32 // (original) command line arguments within the PEB. 39 // (original) command line arguments within the PEB.
33 // Also used in chrome/app, but we define it here to avoid a common->app 40 // Also used in chrome/app, but we define it here to avoid a common->app
34 // dependency. 41 // dependency.
35 static const size_t kMaxSwitches = 15; 42 static const size_t kMaxSwitches = 15;
36 43
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 98
92 // Sets the data on the printer to send along with crash reports. Data may be 99 // Sets the data on the printer to send along with crash reports. Data may be
93 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring 100 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring
94 // would be cut to 63 chars. 101 // would be cut to 63 chars.
95 void SetPrinterInfo(const char* printer_info); 102 void SetPrinterInfo(const char* printer_info);
96 103
97 // Sets the command line arguments to send along with crash reports to the 104 // Sets the command line arguments to send along with crash reports to the
98 // values in |command_line|. 105 // values in |command_line|.
99 void SetCommandLine(const CommandLine* command_line); 106 void SetCommandLine(const CommandLine* command_line);
100 107
108 // Initialize the list of experiment info to send along with crash reports.
109 void SetExperimentList(const std::vector<string16>& state);
110
101 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) 111 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX)
102 // Sets the product channel data to send along with crash reports to |channel|. 112 // Sets the product channel data to send along with crash reports to |channel|.
103 void SetChannel(const std::string& channel); 113 void SetChannel(const std::string& channel);
104 #endif 114 #endif
105 115
106 // Simple wrapper class that sets the active URL in it's constructor and clears 116 // Simple wrapper class that sets the active URL in it's constructor and clears
107 // the active URL in the destructor. 117 // the active URL in the destructor.
108 class ScopedActiveURLSetter { 118 class ScopedActiveURLSetter {
109 public: 119 public:
110 explicit ScopedActiveURLSetter(const GURL& url) { 120 explicit ScopedActiveURLSetter(const GURL& url) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 156
147 extern const int kMaxNumCrashURLChunks; 157 extern const int kMaxNumCrashURLChunks;
148 extern const int kMaxNumURLChunkValueLength; 158 extern const int kMaxNumURLChunkValueLength;
149 extern const char *kUrlChunkFormatStr; 159 extern const char *kUrlChunkFormatStr;
150 160
151 } // namespace child_process_logging 161 } // namespace child_process_logging
152 162
153 #endif // defined(OS_MACOSX) 163 #endif // defined(OS_MACOSX)
154 164
155 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 165 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/child_process_logging_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698