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

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

Issue 2277943002: Update Crashpad to b35ee1fca18956f3c27ba124d6dc456a723c7670 (Closed)
Patch Set: fix build.gn 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: 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 00a12f7ff553b1cc77a1c80ab926421b27f1c673..99c76b776691e1baa3135af1d41293d2937c9e43 100644
--- a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
+++ b/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
@@ -190,11 +190,12 @@ void CrashReportUploadThread::ProcessPendingReport(
Settings* const settings = database_->GetSettings();
bool uploads_enabled;
- if (!settings->GetUploadsEnabled(&uploads_enabled) ||
- !uploads_enabled ||
- url_.empty()) {
- // If the upload-enabled state can’t be determined, uploads are disabled, or
- // there’s no URL to upload to, don’t attempt to upload the new report.
+ if (url_.empty() ||
+ (!report.upload_explicitly_requested &&
+ (!settings->GetUploadsEnabled(&uploads_enabled) || !uploads_enabled))) {
+ // 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);
return;
}
@@ -251,6 +252,10 @@ void CrashReportUploadThread::ProcessPendingReport(
// to at least try to get the report out of the way.
database_->SkipReportUpload(report.uuid);
return;
+
+ case CrashReportDatabase::kCannotRequestUpload:
+ NOTREACHED();
+ return;
}
CallRecordUploadAttempt call_record_upload_attempt(database_, upload_report);

Powered by Google App Engine
This is Rietveld 408576698