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

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

Issue 171843003: Remove --disable-drive flag and flags section in drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 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 */
11 function ToMegaByteString(bytes) { 11 function ToMegaByteString(bytes) {
12 var mb = Math.floor(bytes / (1 << 20)); 12 var mb = Math.floor(bytes / (1 << 20));
13 return mb.toString().replace( 13 return mb.toString().replace(
14 /\d+?(?=(\d{3})+$)/g, // Digit sequence (\d+) followed (?=) by 3n digits. 14 /\d+?(?=(\d{3})+$)/g, // Digit sequence (\d+) followed (?=) by 3n digits.
15 function(three_digit_block) { return three_digit_block + ','; } 15 function(three_digit_block) { return three_digit_block + ','; }
16 ); 16 );
17 } 17 }
18 18
19 /** 19 /**
20 * Updates the Drive related Flags section.
21 * @param {Array} flags List of dictionaries describing flags.
22 */
23 function updateDriveRelatedFlags(flags) {
24 var ul = $('drive-related-flags');
25 updateKeyValueList(ul, flags);
26 }
27
28 /**
29 * Updates the Drive related Preferences section. 20 * Updates the Drive related Preferences section.
30 * @param {Array} preferences List of dictionaries describing preferences. 21 * @param {Array} preferences List of dictionaries describing preferences.
31 */ 22 */
32 function updateDriveRelatedPreferences(preferences) { 23 function updateDriveRelatedPreferences(preferences) {
33 var ul = $('drive-related-preferences'); 24 var ul = $('drive-related-preferences');
34 updateKeyValueList(ul, preferences); 25 updateKeyValueList(ul, preferences);
35 } 26 }
36 27
37 /** 28 /**
38 * Updates the Connection Status section. 29 * Updates the Connection Status section.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 $('button-show-file-entries').addEventListener('click', function() { 291 $('button-show-file-entries').addEventListener('click', function() {
301 var button = $('button-show-file-entries'); 292 var button = $('button-show-file-entries');
302 button.parentNode.removeChild(button); 293 button.parentNode.removeChild(button);
303 chrome.send('listFileEntries'); 294 chrome.send('listFileEntries');
304 }); 295 });
305 296
306 window.setInterval(function() { 297 window.setInterval(function() {
307 chrome.send('periodicUpdate'); 298 chrome.send('periodicUpdate');
308 }, 1000); 299 }, 1000);
309 }); 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