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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager.js

Issue 1109073002: Diable cloud import when Files.app launches as a dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
« 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