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

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

Issue 10908262: [cros] disable GDrive option on certain file pickers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review Created 8 years, 3 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 * 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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 return this.gdataPreferences_.cellularDisabled && 2407 return this.gdataPreferences_.cellularDisabled &&
2408 this.networkState_.online && 2408 this.networkState_.online &&
2409 this.networkState_.type == 'cellular'; 2409 this.networkState_.type == 'cellular';
2410 }; 2410 };
2411 2411
2412 FileManager.prototype.isOffline = function() { 2412 FileManager.prototype.isOffline = function() {
2413 return !this.networkState_.online; 2413 return !this.networkState_.online;
2414 }; 2414 };
2415 2415
2416 FileManager.prototype.isGDataEnabled = function() { 2416 FileManager.prototype.isGDataEnabled = function() {
2417 return !('driveEnabled' in this.gdataPreferences_) || 2417 return this.params_.supportGData &&
Dmitry Zvorygin 2012/09/14 15:55:27 Consider using opposite value - disableGData, beca
Evan Stade 2012/09/14 16:25:12 Done.
2418 this.gdataPreferences_.driveEnabled; 2418 (!('driveEnabled' in this.gdataPreferences_) ||
2419 this.gdataPreferences_.driveEnabled);
2419 }; 2420 };
2420 2421
2421 FileManager.prototype.isOnReadonlyDirectory = function() { 2422 FileManager.prototype.isOnReadonlyDirectory = function() {
2422 return this.directoryModel_.isReadOnly(); 2423 return this.directoryModel_.isReadOnly();
2423 }; 2424 };
2424 2425
2425 FileManager.prototype.onExternallyUnmounted_ = function(event) { 2426 FileManager.prototype.onExternallyUnmounted_ = function(event) {
2426 if (event.mountPath == this.directoryModel_.getCurrentRootPath()) { 2427 if (event.mountPath == this.directoryModel_.getCurrentRootPath()) {
2427 if (this.closeOnUnmount_) { 2428 if (this.closeOnUnmount_) {
2428 // If the file manager opened automatically when a usb drive inserted, 2429 // If the file manager opened automatically when a usb drive inserted,
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
3671 this.dialogDom_.querySelector('#default-action-separator'); 3672 this.dialogDom_.querySelector('#default-action-separator');
3672 3673
3673 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard 3674 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard
3674 // attribute and we can't use it's setter as usual. 3675 // attribute and we can't use it's setter as usual.
3675 this.openWithCommand_.__lookupSetter__('hidden'). 3676 this.openWithCommand_.__lookupSetter__('hidden').
3676 call(this.openWithCommand_, !(defaultItem && isMultiple)); 3677 call(this.openWithCommand_, !(defaultItem && isMultiple));
3677 this.defaultActionMenuItem_.hidden = !defaultItem; 3678 this.defaultActionMenuItem_.hidden = !defaultItem;
3678 defaultActionSeparator.hidden = !defaultItem; 3679 defaultActionSeparator.hidden = !defaultItem;
3679 }; 3680 };
3680 })(); 3681 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698