summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 00:07:37 +0000
committeryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 00:07:37 +0000
commit4dcda6a4286cd4936d56194954ce68cd86bd52d0 (patch)
tree6be23de9c1b003301b8b54bbb46c075d2ca4f74a
parentc992609d887a6b067831abce00efe7cbba2d783d (diff)
downloadchromium_src-4dcda6a4286cd4936d56194954ce68cd86bd52d0.zip
chromium_src-4dcda6a4286cd4936d56194954ce68cd86bd52d0.tar.gz
chromium_src-4dcda6a4286cd4936d56194954ce68cd86bd52d0.tar.bz2
Merge 192009 "Files.app: refinement of the condition of authenti..."
> Files.app: refinement of the condition of authentication error. > > This patch limits the condition to show the authentication error banner. With this patch, the banner shoes only when authentication fails. > > BUG=180308, 180316 > TEST=manual > > Review URL: https://chromiumcodereview.appspot.com/13144010 TBR=yoshiki@chromium.org Review URL: https://codereview.chromium.org/13856002 git-svn-id: svn://svn.chromium.org/chrome/branches/1453/src@192956 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/file_manager/js/drive_banners.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/resources/file_manager/js/drive_banners.js b/chrome/browser/resources/file_manager/js/drive_banners.js
index 2dcef13..322a51a 100644
--- a/chrome/browser/resources/file_manager/js/drive_banners.js
+++ b/chrome/browser/resources/file_manager/js/drive_banners.js
@@ -644,8 +644,13 @@ FileListBannerController.prototype.updateDriveUnmountedPanel_ = function() {
*/
FileListBannerController.prototype.maybeShowAuthFailBanner_ = function() {
var connection = this.volumeManager_.getDriveConnectionState();
+ var reasons = connection.reasons;
var showDriveNotReachedMessage =
+ this.isOnDrive() &&
connection.type == VolumeManager.DriveConnectionType.OFFLINE &&
- connection.reasons.indexOf('not_ready') !== -1;
+ // Show the banner only when authentication fails. Don't show it when the
+ // drive service is disabled.
+ reasons.indexOf(VolumeManager.DriveConnectionReason.NOT_READY) != -1 &&
+ reasons.indexOf(VolumeManager.DriveConnectionReason.NO_SERVICE) == -1;
this.authFailedBanner_.hidden = !showDriveNotReachedMessage;
};