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

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

Issue 2324983002: [Android] Wire up manual crash uploads. (Closed)
Patch Set: Write tests, and show forced uploads in chrome://crashes UI 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..654af34a53ba129d504090470afd2f65923deb8b 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)
Mark Mentovai 2016/09/15 00:02:30 Is it helpful to get rid of these rather than add
Ilya Sherman 2016/09/21 22:50:03 I'm kind of assuming the compiler can strip dead c
// 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)
- // Maunal uploads currently are supported only for Crashpad-using platforms
- // and only if crash uploads are not disabled by policy.
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
+ // Maunal uploads currently are supported only for Crashpad-using platforms or
Mark Mentovai 2016/09/15 00:02:30 and
Ilya Sherman 2016/09/21 22:50:03 Done.
+ // 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

Powered by Google App Engine
This is Rietveld 408576698