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

Unified Diff: third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc

Issue 2372593004: Update Crashpad to ac6c01b5752ecb1aa1da0ea613740cf6825bb72e (Closed)
Patch Set: . Created 4 years, 3 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: third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
diff --git a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc b/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
index 99c76b776691e1baa3135af1d41293d2937c9e43..23dda482fa1515c8e527986cf011b05a3503ee59 100644
--- a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
+++ b/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
@@ -28,6 +28,7 @@
#include "snapshot/minidump/process_snapshot_minidump.h"
#include "snapshot/module_snapshot.h"
#include "util/file/file_reader.h"
+#include "util/misc/metrics.h"
#include "util/misc/uuid.h"
#include "util/net/http_body.h"
#include "util/net/http_multipart_builder.h"
@@ -196,7 +197,8 @@ void CrashReportUploadThread::ProcessPendingReport(
// Don’t attempt an upload if there’s no URL to upload to. Allow upload if
// it has been explicitly requested by the user, otherwise, respect the
// upload-enabled state stored in the database’s settings.
- database_->SkipReportUpload(report.uuid);
+ database_->SkipReportUpload(report.uuid,
+ Metrics::CrashSkippedReason::kUploadsDisabled);
return;
}
@@ -217,7 +219,8 @@ void CrashReportUploadThread::ProcessPendingReport(
// attempt to upload the report.
const int kUploadAttemptIntervalSeconds = 60 * 60; // 1 hour
if (now - last_upload_attempt_time < kUploadAttemptIntervalSeconds) {
- database_->SkipReportUpload(report.uuid);
+ database_->SkipReportUpload(
+ report.uuid, Metrics::CrashSkippedReason::kUploadThrottled);
return;
}
} else {
@@ -228,7 +231,8 @@ void CrashReportUploadThread::ProcessPendingReport(
// accept it and don’t attempt to upload the report.
const int kBackwardsClockTolerance = 60 * 60 * 24; // 1 day
if (last_upload_attempt_time - now < kBackwardsClockTolerance) {
- database_->SkipReportUpload(report.uuid);
+ database_->SkipReportUpload(
+ report.uuid, Metrics::CrashSkippedReason::kUnexpectedTime);
return;
}
}
@@ -250,7 +254,8 @@ void CrashReportUploadThread::ProcessPendingReport(
case CrashReportDatabase::kDatabaseError:
// In these cases, SkipReportUpload() might not work either, but it’s best
// to at least try to get the report out of the way.
- database_->SkipReportUpload(report.uuid);
+ database_->SkipReportUpload(report.uuid,
+ Metrics::CrashSkippedReason::kDatabaseError);
return;
case CrashReportDatabase::kCannotRequestUpload:
@@ -274,7 +279,8 @@ void CrashReportUploadThread::ProcessPendingReport(
// TODO(mark): Deal with retries properly: don’t call SkipReportUplaod()
// if the result was kRetry and the report hasn’t already been retried
// too many times.
- database_->SkipReportUpload(report.uuid);
+ database_->SkipReportUpload(report.uuid,
+ Metrics::CrashSkippedReason::kUploadFailed);
break;
}
}
« no previous file with comments | « third_party/crashpad/crashpad/client/prune_crash_reports_test.cc ('k') | third_party/crashpad/crashpad/util/misc/metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698