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

Side by Side Diff: components/crash/content/app/crash_reporter_client.h

Issue 2221833005: Adding support for sampling crashes in Chrome on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scottmg's comments Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Register all of the potential crash keys that can be sent to the crash 131 // Register all of the potential crash keys that can be sent to the crash
132 // reporting server. Returns the size of the union of all keys. 132 // reporting server. Returns the size of the union of all keys.
133 virtual size_t RegisterCrashKeys(); 133 virtual size_t RegisterCrashKeys();
134 134
135 // Returns true if running in unattended mode (for automated testing). 135 // Returns true if running in unattended mode (for automated testing).
136 virtual bool IsRunningUnattended(); 136 virtual bool IsRunningUnattended();
137 137
138 // Returns true if the user has given consent to collect stats. 138 // Returns true if the user has given consent to collect stats.
139 virtual bool GetCollectStatsConsent(); 139 virtual bool GetCollectStatsConsent();
140 140
141 // Returns true if the client is currently in the chosen sample that will
142 // report stats and crashes. Crashes should only be reported if this function
143 // returns true and GetCollectStatsConsent returns true.
144 virtual bool GetCollectStatsInSample();
robertshield 2016/08/12 17:49:25 It seems weird to me that consumers need to know a
jwd 2016/08/16 19:29:11 Callers of this from outside crash_reporter should
145
141 #if defined(OS_WIN) || defined(OS_MACOSX) 146 #if defined(OS_WIN) || defined(OS_MACOSX)
142 // Returns true if crash reporting is enforced via management policies. In 147 // Returns true if crash reporting is enforced via management policies. In
143 // that case, |breakpad_enabled| is set to the value enforced by policies. 148 // that case, |breakpad_enabled| is set to the value enforced by policies.
144 virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); 149 virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
145 #endif 150 #endif
146 151
147 #if defined(OS_ANDROID) 152 #if defined(OS_ANDROID)
148 // Returns the descriptor key of the android minidump global descriptor. 153 // Returns the descriptor key of the android minidump global descriptor.
149 virtual int GetAndroidMinidumpDescriptor(); 154 virtual int GetAndroidMinidumpDescriptor();
150 155
151 // Returns true if breakpad microdumps should be enabled. This orthogonal to 156 // Returns true if breakpad microdumps should be enabled. This orthogonal to
152 // the standard minidump uploader (which depends on the user consent). 157 // the standard minidump uploader (which depends on the user consent).
153 virtual bool ShouldEnableBreakpadMicrodumps(); 158 virtual bool ShouldEnableBreakpadMicrodumps();
154 #endif 159 #endif
155 160
156 // Returns true if breakpad should run in the given process type. 161 // Returns true if breakpad should run in the given process type.
157 virtual bool EnableBreakpadForProcess(const std::string& process_type); 162 virtual bool EnableBreakpadForProcess(const std::string& process_type);
158 }; 163 };
159 164
160 } // namespace crash_reporter 165 } // namespace crash_reporter
161 166
162 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 167 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698