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

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

Issue 886093003: Add support for size checking selection based scans. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DefaultScanResult to use importerResolver instead of hand rolled support...was investigating… Created 5 years, 11 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
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 726be4e9724126afe77eee819a7f15a57c0aa508..b9290b81257a7b25cdaa52a4ba193010daef6523 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -416,6 +416,21 @@ FileManager.prototype = /** @struct */ {
this.directoryModel_,
this.commandHandler);
+ importer.importEnabled().then(
+ function(enabled) {
+ if (enabled) {
+ this.importController_ = new importer.ImportController(
+ new importer.RuntimeControllerEnvironment(
+ this,
+ this.selectionHandler_),
+ /** @type {!importer.MediaScanner} */ (
+ this.mediaScanner_),
+ /** @type {!importer.ImportRunner} */ (
+ this.mediaImportHandler_),
+ new importer.RuntimeCommandWidget());
+ }
+ }.bind(this));
+
assert(this.fileFilter_);
assert(this.namingController_);
assert(this.appStateController_);
@@ -479,22 +494,6 @@ FileManager.prototype = /** @struct */ {
this.commandHandler = new CommandHandler(this);
- // Kick the import enabled promise to be sure it is loaded
- // (and cached) for use by code that requires synchronous
- // access (e.g. Commands).
- importer.importEnabled().then(
- function(enabled) {
- if (enabled) {
- this.importController_ = new importer.ImportController(
- new importer.RuntimeControllerEnvironment(this),
- /** @type {!importer.MediaScanner} */ (
- this.mediaScanner_),
- /** @type {!importer.ImportRunner} */ (
- this.mediaImportHandler_),
- new importer.RuntimeCommandWidget());
- }
- }.bind(this));
-
// TODO(hirono): Move the following block to the UI part.
var commandButtons = this.dialogDom_.querySelectorAll('button[command]');
for (var j = 0; j < commandButtons.length; j++)

Powered by Google App Engine
This is Rietveld 408576698