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

Unified Diff: chrome/browser/ui/webui/crashes_ui.cc

Issue 2324983002: [Android] Wire up manual crash uploads. (Closed)
Patch Set: Fix pending upload handling, and nit fixes 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: chrome/browser/ui/webui/crashes_ui.cc
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc
index 93cd252213010e70553cfbf53e27008e4584a014..a4fca4f79f85ff44fb321ab1e202883ca0a1e167 100644
--- a/chrome/browser/ui/webui/crashes_ui.cc
+++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -93,10 +93,8 @@ class CrashesDOMHandler : public WebUIMessageHandler,
// Sends the recent crashes list JS.
void UpdateUI();
-#if defined(OS_WIN) || defined(OS_MACOSX)
// Asynchronously requests a user triggered upload. Called from JS.
void HandleRequestSingleCrashUpload(const base::ListValue* args);
-#endif
scoped_refptr<CrashUploadList> upload_list_;
bool list_available_;
@@ -128,12 +126,10 @@ void CrashesDOMHandler::RegisterMessages() {
base::Unretained(this)));
#endif
-#if defined(OS_WIN) || defined(OS_MACOSX)
web_ui()->RegisterMessageCallback(
crash::kCrashesUIRequestSingleCrashUpload,
base::Bind(&CrashesDOMHandler::HandleRequestSingleCrashUpload,
base::Unretained(this)));
-#endif
}
void CrashesDOMHandler::HandleRequestCrashes(const base::ListValue* args) {
@@ -176,9 +172,9 @@ void CrashesDOMHandler::UpdateUI() {
bool upload_list = crash_reporting_enabled;
bool support_manual_uploads = false;
-#if defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
// Maunal uploads currently are supported only for Crashpad-using platforms
- // and only if crash uploads are not disabled by policy.
+ // and Android, and only if crash uploads are not disabled by policy.
support_manual_uploads =
crash_reporting_enabled || !IsMetricsReportingPolicyManaged();
@@ -209,7 +205,6 @@ void CrashesDOMHandler::UpdateUI() {
args);
}
-#if defined(OS_WIN) || defined(OS_MACOSX)
void CrashesDOMHandler::HandleRequestSingleCrashUpload(
const base::ListValue* args) {
DCHECK(args);
@@ -225,7 +220,6 @@ void CrashesDOMHandler::HandleRequestSingleCrashUpload(
}
upload_list_->RequestSingleCrashUploadAsync(local_id);
}
-#endif
} // namespace
« no previous file with comments | « chrome/browser/crash_upload_list/crash_upload_list_android.cc ('k') | components/upload_list/upload_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698