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

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: Created 8 years, 9 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
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 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/mac/crash_logging.h" 13 #include "base/mac/crash_logging.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 15
16 class CommandLine; 16 class CommandLine;
17 17
18 namespace content { 18 namespace content {
19 struct GPUInfo; 19 struct GPUInfo;
20 } 20 }
21 21
22 // The maximum number of active extensions we will report. 22 // 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 23 // Also used in chrome/app, but we define it here to avoid a common->app
24 // dependency. 24 // dependency.
25 static const int kMaxReportedActiveExtensions = 10; 25 static const int kMaxReportedActiveExtensions = 10;
26 26
27 // The maximum number of experiment chunks we will report.
28 // Also used in chrome/app, but we define it here to avoid a common->app
29 // dependency.
30 static const int kMaxReportedExperimentChunks = 15;
robertshield 2012/03/23 15:42:10 Is there already an app->common dependency? If the
MAD 2012/03/23 18:24:23 It is defined only once... here... :-)
31
27 // The maximum number of prn-info-* records. 32 // The maximum number of prn-info-* records.
28 static const size_t kMaxReportedPrinterRecords = 4; 33 static const size_t kMaxReportedPrinterRecords = 4;
29 34
30 // The maximum number of command line switches to include in the crash 35 // 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 36 // report's metadata. Note that the mini-dump itself will also contain the
32 // (original) command line arguments within the PEB. 37 // (original) command line arguments within the PEB.
33 // Also used in chrome/app, but we define it here to avoid a common->app 38 // Also used in chrome/app, but we define it here to avoid a common->app
34 // dependency. 39 // dependency.
35 static const size_t kMaxSwitches = 15; 40 static const size_t kMaxSwitches = 15;
36 41
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 96
92 // Sets the data on the printer to send along with crash reports. Data may be 97 // Sets the data on the printer to send along with crash reports. Data may be
93 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring 98 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring
94 // would be cut to 63 chars. 99 // would be cut to 63 chars.
95 void SetPrinterInfo(const char* printer_info); 100 void SetPrinterInfo(const char* printer_info);
96 101
97 // Sets the command line arguments to send along with crash reports to the 102 // Sets the command line arguments to send along with crash reports to the
98 // values in |command_line|. 103 // values in |command_line|.
99 void SetCommandLine(const CommandLine* command_line); 104 void SetCommandLine(const CommandLine* command_line);
100 105
106 // Initialize the list of experiment info to send along with crash reports.
107 void InitExperimentList(const std::string& state);
108
109 // Add a new experiment group info to send along with crash reports.
110 void AddFieldTrialGroup(const std::string& field_trial_name,
111 const std::string& group_name);
112
113 // Cleanup the list of experiment info to send along with crash reports.
114 void TermExperimentList();
115
101 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) 116 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX)
102 // Sets the product channel data to send along with crash reports to |channel|. 117 // Sets the product channel data to send along with crash reports to |channel|.
103 void SetChannel(const std::string& channel); 118 void SetChannel(const std::string& channel);
104 #endif 119 #endif
105 120
106 // Simple wrapper class that sets the active URL in it's constructor and clears 121 // Simple wrapper class that sets the active URL in it's constructor and clears
107 // the active URL in the destructor. 122 // the active URL in the destructor.
108 class ScopedActiveURLSetter { 123 class ScopedActiveURLSetter {
109 public: 124 public:
110 explicit ScopedActiveURLSetter(const GURL& url) { 125 explicit ScopedActiveURLSetter(const GURL& url) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 161
147 extern const int kMaxNumCrashURLChunks; 162 extern const int kMaxNumCrashURLChunks;
148 extern const int kMaxNumURLChunkValueLength; 163 extern const int kMaxNumURLChunkValueLength;
149 extern const char *kUrlChunkFormatStr; 164 extern const char *kUrlChunkFormatStr;
150 165
151 } // namespace child_process_logging 166 } // namespace child_process_logging
152 167
153 #endif // defined(OS_MACOSX) 168 #endif // defined(OS_MACOSX)
154 169
155 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 170 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698