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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10855124: [FileBrowser] Fixed gdata space info in nested folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 4128 matching lines...) Expand 10 before | Expand all | Expand 10 after
4139 4139
4140 /** 4140 /**
4141 * Listener invoked on gdata menu show event, to update gdata free/total 4141 * Listener invoked on gdata menu show event, to update gdata free/total
4142 * space info in opened menu. 4142 * space info in opened menu.
4143 * @private 4143 * @private
4144 */ 4144 */
4145 FileManager.prototype.onGDataMenuShow_ = function() { 4145 FileManager.prototype.onGDataMenuShow_ = function() {
4146 this.updateCommands_(); 4146 this.updateCommands_();
4147 this.gdataSpaceInfoBar_.setAttribute('pending', ''); 4147 this.gdataSpaceInfoBar_.setAttribute('pending', '');
4148 chrome.fileBrowserPrivate.getSizeStats( 4148 chrome.fileBrowserPrivate.getSizeStats(
4149 this.directoryModel_.getCurrentDirEntry().toURL(), function(result) { 4149 this.directoryModel_.getCurrentRootUrl(), function(result) {
4150 if (!chrome.extension.lastError) { 4150 if (!chrome.extension.lastError) {
4151 this.gdataSpaceInfoBar_.removeAttribute('pending'); 4151 this.gdataSpaceInfoBar_.removeAttribute('pending');
4152 4152
4153 var sizeInGb = util.bytesToSi(result.remainingSizeKB * 1024); 4153 var sizeInGb = util.bytesToSi(result.remainingSizeKB * 1024);
4154 this.gdataSpaceInfoLabel_.textContent = 4154 this.gdataSpaceInfoLabel_.textContent =
4155 strf('GDATA_SPACE_AVAILABLE', sizeInGb); 4155 strf('GDATA_SPACE_AVAILABLE', sizeInGb);
4156 4156
4157 var usedSpace = result.totalSizeKB - result.remainingSizeKB; 4157 var usedSpace = result.totalSizeKB - result.remainingSizeKB;
4158 4158
4159 this.gdataSpaceInfoBar_.style.display = ''; 4159 this.gdataSpaceInfoBar_.style.display = '';
(...skipping 20 matching lines...) Expand all
4180 } 4180 }
4181 4181
4182 var defaultActionSeparator = 4182 var defaultActionSeparator =
4183 this.dialogDom_.querySelector('#default-action-separator'); 4183 this.dialogDom_.querySelector('#default-action-separator');
4184 4184
4185 this.defaultActionMenuItem_.hidden = !taskItem; 4185 this.defaultActionMenuItem_.hidden = !taskItem;
4186 defaultActionSeparator.hidden = !taskItem; 4186 defaultActionSeparator.hidden = !taskItem;
4187 } 4187 }
4188 })(); 4188 })();
4189 4189
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698