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

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

Issue 218623020: Files.app: fix a bug that low-space warning is not shown at all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Responsible for showing following banners in the file list. 8 * Responsible for showing following banners in the file list.
9 * - WelcomeBanner 9 * - WelcomeBanner
10 * - AuthFailBanner 10 * - AuthFailBanner
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 this.showLowDownloadsSpaceWarning_(false); 514 this.showLowDownloadsSpaceWarning_(false);
515 this.showLowDriveSpaceWarning_(false); 515 this.showLowDriveSpaceWarning_(false);
516 return; 516 return;
517 } 517 }
518 518
519 // If not mounted correctly, then do not continue. 519 // If not mounted correctly, then do not continue.
520 if (!volume.fileSystem) 520 if (!volume.fileSystem)
521 return; 521 return;
522 522
523 chrome.fileBrowserPrivate.getSizeStats( 523 chrome.fileBrowserPrivate.getSizeStats(
524 volume.fileSystem.root.toURL(), 524 volume.volumeId,
525 function(sizeStats) { 525 function(sizeStats) {
526 var currentVolume = this.volumeManager_.getVolumeInfo( 526 var currentVolume = this.volumeManager_.getVolumeInfo(
527 this.directoryModel_.getCurrentDirEntry()); 527 this.directoryModel_.getCurrentDirEntry());
528 if (volume !== currentVolume) { 528 if (volume !== currentVolume) {
529 // This happens when the current directory is moved during requesting 529 // This happens when the current directory is moved during requesting
530 // the file system size. Just ignore it. 530 // the file system size. Just ignore it.
531 return; 531 return;
532 } 532 }
533 // sizeStats is undefined, if some error occurs. 533 // sizeStats is undefined, if some error occurs.
534 if (!sizeStats || sizeStats.totalSize == 0) 534 if (!sizeStats || sizeStats.totalSize == 0)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 * @private 660 * @private
661 */ 661 */
662 FileListBannerController.prototype.maybeShowAuthFailBanner_ = function() { 662 FileListBannerController.prototype.maybeShowAuthFailBanner_ = function() {
663 var connection = this.volumeManager_.getDriveConnectionState(); 663 var connection = this.volumeManager_.getDriveConnectionState();
664 var showDriveNotReachedMessage = 664 var showDriveNotReachedMessage =
665 this.isOnCurrentProfileDrive() && 665 this.isOnCurrentProfileDrive() &&
666 connection.type == util.DriveConnectionType.OFFLINE && 666 connection.type == util.DriveConnectionType.OFFLINE &&
667 connection.reason == util.DriveConnectionReason.NOT_READY; 667 connection.reason == util.DriveConnectionReason.NOT_READY;
668 this.authFailedBanner_.hidden = !showDriveNotReachedMessage; 668 this.authFailedBanner_.hidden = !showDriveNotReachedMessage;
669 }; 669 };
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