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

Unified Diff: components/crash/content/app/crashpad.cc

Issue 2221833005: Adding support for sampling crashes in Chrome on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding support for sampling crashes in Chrome on Windows. 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 side-by-side diff with in-line comments
Download patch
Index: components/crash/content/app/crashpad.cc
diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc
index 85afe46af675145d2b1251ea5a3b9e5989123eb2..63771553df1c4171b8006766926ee96d4d26ed42 100644
--- a/components/crash/content/app/crashpad.cc
+++ b/components/crash/content/app/crashpad.cc
@@ -295,7 +295,8 @@ void InitializeCrashpadWithEmbeddedHandler(bool initial_client,
void SetUploadsEnabled(bool enable_uploads) {
if (g_database) {
crashpad::Settings* settings = g_database->GetSettings();
- settings->SetUploadsEnabled(enable_uploads);
+ settings->SetUploadsEnabled(
+ enable_uploads && GetCrashReporterClient()->GetCollectStatsInSample());
Alexei Svitkine (slow) 2016/08/10 21:49:34 Maybe I didn't follow all the discussion, but what
jwd 2016/08/11 21:41:03 My understanding is that SetUploadsEnabled expects
Alexei Svitkine (slow) 2016/08/11 21:46:34 Mark, could you clarify your thoughts on this? Wou
Mark Mentovai 2016/08/11 22:08:36 SetUploadsEnabled sees the value of the checkbox.
}
}
@@ -460,6 +461,12 @@ void ReadMainModuleAnnotationsForKasko(
extern "C" {
+// This function is used in chrome_metrics_services_manager_client.cc to trigger
+// changes to if crash uploads are enabled.
Alexei Svitkine (slow) 2016/08/10 21:49:34 The last bit of this sentence is a bit hard to und
jwd 2016/08/11 21:41:03 Done.
+void __declspec(dllexport) __cdecl SetUploadsEnabledImpl(bool enable_uploads) {
+ crash_reporter::SetUploadsEnabled(enable_uploads);
+}
+
// NOTE: This function is used by SyzyASAN to annotate crash reports. If you
// change the name or signature of this function you will break SyzyASAN
// instrumented releases of Chrome. Please contact syzygy-team@chromium.org

Powered by Google App Engine
This is Rietveld 408576698