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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/drive_banners.js

Issue 98493003: Simplify fileBrowserPrivate.getDriveConnectionStatus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the util function name. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/foreground/js/drive_banners.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/drive_banners.js b/chrome/browser/resources/file_manager/foreground/js/drive_banners.js
index 9149befe51ff499a7d789c1748f107bd16e7bcb8..25692c8e727bd79dc2fb0134f7ce77290a40b0ff 100644
--- a/chrome/browser/resources/file_manager/foreground/js/drive_banners.js
+++ b/chrome/browser/resources/file_manager/foreground/js/drive_banners.js
@@ -653,13 +653,9 @@ FileListBannerController.prototype.updateDriveUnmountedPanel_ = function() {
*/
FileListBannerController.prototype.maybeShowAuthFailBanner_ = function() {
var connection = this.volumeManager_.getDriveConnectionState();
- var reasons = connection.reasons;
var showDriveNotReachedMessage =
this.isOnCurrentProfileDrive() &&
connection.type == util.DriveConnectionType.OFFLINE &&
- // Show the banner only when authentication fails. Don't show it when the
- // drive service is disabled.
- reasons.indexOf(util.DriveConnectionReason.NOT_READY) != -1 &&
- reasons.indexOf(util.DriveConnectionReason.NO_SERVICE) == -1;
+ connection.reason == util.DriveConnectionReason.NOT_READY;
this.authFailedBanner_.hidden = !showDriveNotReachedMessage;
};

Powered by Google App Engine
This is Rietveld 408576698