| Index: ui/file_manager/file_manager/foreground/js/file_manager.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| index 14fc3b7e103cb02a285fab1dc8f70279a7958408..0baac2396a245607b21fccabb5df79b5c0221682 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
|
| @@ -261,13 +261,6 @@ function FileManager() {
|
| * @private
|
| */
|
| this.initializeQueue_ = new AsyncUtil.Group();
|
| -
|
| - /**
|
| - * Indicates whether cloud import is enabled. This is initialized in
|
| - * #initSettings.
|
| - * @private {boolean}
|
| - */
|
| - this.importEnabled_ = true;
|
| }
|
|
|
| FileManager.prototype = /** @struct */ {
|
| @@ -374,17 +367,7 @@ FileManager.prototype = /** @struct */ {
|
| (function() {
|
| FileManager.prototype.initSettings_ = function(callback) {
|
| this.appStateController_ = new AppStateController(this.dialogType);
|
| - var whenViewOptionsLoaded =
|
| - this.appStateController_.loadInitialViewOptions();
|
| - var whenImportFlagLoaded = importer.importEnabled().then(
|
| - function(enabled) {
|
| - this.importEnabled_ = enabled;
|
| - }.bind(this));
|
| -
|
| - Promise.all([
|
| - whenViewOptionsLoaded,
|
| - whenImportFlagLoaded
|
| - ]).then(callback);
|
| + this.appStateController_.loadInitialViewOptions().then(callback);
|
| };
|
|
|
| /**
|
| @@ -444,19 +427,21 @@ FileManager.prototype = /** @struct */ {
|
| this.ui_.emptyFolder,
|
| this.directoryModel_);
|
|
|
| - importer.importEnabled().then(
|
| - function(enabled) {
|
| - if (enabled) {
|
| - this.importController_ = new importer.ImportController(
|
| - new importer.RuntimeControllerEnvironment(
|
| - this,
|
| - assert(this.selectionHandler_)),
|
| - assert(this.mediaScanner_),
|
| - assert(this.mediaImportHandler_),
|
| - new importer.RuntimeCommandWidget(),
|
| - assert(this.tracker_));
|
| - }
|
| - }.bind(this));
|
| + if (this.dialogType === DialogType.FULL_PAGE) {
|
| + importer.importEnabled().then(
|
| + function(enabled) {
|
| + if (enabled) {
|
| + this.importController_ = new importer.ImportController(
|
| + new importer.RuntimeControllerEnvironment(
|
| + this,
|
| + assert(this.selectionHandler_)),
|
| + assert(this.mediaScanner_),
|
| + assert(this.mediaImportHandler_),
|
| + new importer.RuntimeCommandWidget(),
|
| + assert(this.tracker_));
|
| + }
|
| + }.bind(this));
|
| + }
|
|
|
| assert(this.fileFilter_);
|
| assert(this.namingController_);
|
|
|