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

Unified Diff: chrome/browser/resources/crashes.js

Issue 23650005: chrome://crashes: reload uploads.log every time the page refreshes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « chrome/browser/resources/crashes.html ('k') | chrome/browser/ui/webui/crashes_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/crashes.js
diff --git a/chrome/browser/resources/crashes.js b/chrome/browser/resources/crashes.js
index c845c748f4f59de4bc31bd448a40a5da8022476d..27cfbd9009977672d7ce8372ff21348b3cccd428 100644
--- a/chrome/browser/resources/crashes.js
+++ b/chrome/browser/resources/crashes.js
@@ -2,10 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+/* Id for tracking automatic refresh of crash list. */
+var refreshCrashListId = undefined;
+
/**
* Requests the list of crashes from the backend.
*/
function requestCrashes() {
+ refreshCrashListId = clearInterval(refreshCrashListId);
chrome.send('requestCrashList');
}
@@ -83,4 +87,26 @@ function updateCrashList(enabled, crashes, version) {
$('noCrashes').hidden = crashes.length != 0;
}
+/**
+ * Request crashes get uploaded in the background.
+ */
+function requestCrashUpload() {
+ chrome.send('requestCrashUpload');
+
+ // Trigger a refresh in 5 seconds.
+ refreshCrashListId = setInterval(requestCrashes, 5000);
+}
+
+/**
+ * Callback from backend when crash uploading has started.
+ * @param {boolean} enabled Whether or not crash reporting is enabled.
+ */
+function updateCrashUploadStatus(enabled) {
+ $('uploadCrashesLink').onclick = requestCrashUpload;
+ $('crashUploadStatus').hidden = !enabled;
+
+ if (!enabled)
+ return;
+}
+
document.addEventListener('DOMContentLoaded', requestCrashes);
« no previous file with comments | « chrome/browser/resources/crashes.html ('k') | chrome/browser/ui/webui/crashes_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698