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

Side by Side Diff: chrome/browser/resources/chromeos/drive_internals.js

Issue 98583002: Add Drive connection status info to chrome:drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Converts a number in bytes to a string in megabytes split by comma into 6 * Converts a number in bytes to a string in megabytes split by comma into
7 * three digit block. 7 * three digit block.
8 * @param {number} bytes The number in bytes. 8 * @param {number} bytes The number in bytes.
9 * @return {string} Formatted string in megabytes. 9 * @return {string} Formatted string in megabytes.
10 */ 10 */
(...skipping 17 matching lines...) Expand all
28 /** 28 /**
29 * Updates the Drive related Preferences section. 29 * Updates the Drive related Preferences section.
30 * @param {Array} preferences List of dictionaries describing preferences. 30 * @param {Array} preferences List of dictionaries describing preferences.
31 */ 31 */
32 function updateDriveRelatedPreferences(preferences) { 32 function updateDriveRelatedPreferences(preferences) {
33 var ul = $('drive-related-preferences'); 33 var ul = $('drive-related-preferences');
34 updateKeyValueList(ul, preferences); 34 updateKeyValueList(ul, preferences);
35 } 35 }
36 36
37 /** 37 /**
38 * Updates the Authentication Status section. 38 * Updates the Connection Status section.
39 * @param {Object} authStatus Dictionary containing auth status. 39 * @param {Object} connStatus Dictionary containing connection status.
40 */ 40 */
41 function updateAuthStatus(authStatus) { 41 function updateConnectionStatus(connStatus) {
42 $('has-refresh-token').textContent = authStatus['has-refresh-token']; 42 $('connection-status').textContent = connStatus['status'];
43 $('has-access-token').textContent = authStatus['has-access-token']; 43 $('has-refresh-token').textContent = connStatus['has-refresh-token'];
44 $('has-access-token').textContent = connStatus['has-access-token'];
44 } 45 }
45 46
46 /** 47 /**
47 * Updates the GCache Contents section. 48 * Updates the GCache Contents section.
48 * @param {Array} gcacheContents List of dictionaries describing metadata 49 * @param {Array} gcacheContents List of dictionaries describing metadata
49 * of files and directories under the GCache directory. 50 * of files and directories under the GCache directory.
50 * @param {Object} gcacheSummary Dictionary of summary of GCache. 51 * @param {Object} gcacheSummary Dictionary of summary of GCache.
51 */ 52 */
52 function updateGCacheContents(gcacheContents, gcacheSummary) { 53 function updateGCacheContents(gcacheContents, gcacheSummary) {
53 var tbody = $('gcache-contents'); 54 var tbody = $('gcache-contents');
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 $('button-show-file-entries').addEventListener('click', function() { 291 $('button-show-file-entries').addEventListener('click', function() {
291 var button = $('button-show-file-entries'); 292 var button = $('button-show-file-entries');
292 button.parentNode.removeChild(button); 293 button.parentNode.removeChild(button);
293 chrome.send('listFileEntries'); 294 chrome.send('listFileEntries');
294 }); 295 });
295 296
296 window.setInterval(function() { 297 window.setInterval(function() {
297 chrome.send('periodicUpdate'); 298 chrome.send('periodicUpdate');
298 }, 1000); 299 }, 1000);
299 }); 300 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/drive_internals.html ('k') | chrome/browser/ui/webui/chromeos/drive_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698