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

Unified Diff: chrome/browser/resources/chromeos/drive_internals.js

Issue 59083013: Add 'Clear local data and reload' button in chrome:drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/resources/chromeos/drive_internals.js
diff --git a/chrome/browser/resources/chromeos/drive_internals.js b/chrome/browser/resources/chromeos/drive_internals.js
index c8736212e9abcd0a257253204355dd9ffcdc1094..8ac6e86883b892f11b9feee724b0546ff87f49fc 100644
--- a/chrome/browser/resources/chromeos/drive_internals.js
+++ b/chrome/browser/resources/chromeos/drive_internals.js
@@ -251,6 +251,14 @@ function updateKeyValueList(ul, list) {
}
}
+/**
+ * Updates the text next to the 'reload' button to update the status.
+ * @param {boolean} success whether or not reloading has succeeded.
+ */
+function updateReloadStatus(success) {
+ $('reload-status-text').textContent = (success ? 'success' : 'failed');
+}
+
document.addEventListener('DOMContentLoaded', function() {
chrome.send('pageLoaded');
@@ -274,6 +282,11 @@ document.addEventListener('DOMContentLoaded', function() {
chrome.send('clearRefreshToken');
});
+ $('button-reload-drive-filesystem').addEventListener('click', function() {
+ $('reload-status-text').textContent = 'reloading...';
+ chrome.send('reloadDriveFileSystem');
+ });
+
$('button-show-file-entries').addEventListener('click', function() {
var button = $('button-show-file-entries');
button.parentNode.removeChild(button);

Powered by Google App Engine
This is Rietveld 408576698