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

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

Issue 6895008: Merge 82577 - FileManager: assorted fixes* Switch webkitRequestFileSystem/webkitResolveLocalFileS... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 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
Index: chrome/browser/resources/file_manager/js/file_manager.js
===================================================================
--- chrome/browser/resources/file_manager/js/file_manager.js (revision 82590)
+++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
@@ -459,9 +459,9 @@
if (this.dialogType_ == FileManager.DialogType.SELECT_OPEN_FILE ||
this.dialogType_ == FileManager.DialogType.SELECT_OPEN_FOLDER ||
this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) {
- this.selectionModel_ = new cr.ui.table.TableSingleSelectionModel();
+ this.selectionModelClass_ = cr.ui.table.TableSingleSelectionModel;
} else {
- this.selectionModel_ = new cr.ui.table.TableSelectionModel();
+ this.selectionModelClass_ = cr.ui.table.TableSelectionModel;
}
this.initTable_();
@@ -506,7 +506,7 @@
this.grid_ = this.dialogDom_.querySelector('.thumbnail-grid');
cr.ui.Grid.decorate(this.grid_);
this.grid_.dataModel = this.dataModel_;
- this.grid_.selectionModel = this.selectionModel_;
+ this.grid_.selectionModel = new this.selectionModelClass_();
var self = this;
this.grid_.itemConstructor = function(entry) {
@@ -541,7 +541,7 @@
cr.ui.Table.decorate(this.table_);
this.table_.dataModel = this.dataModel_;
- this.table_.selectionModel = this.selectionModel_;
+ this.table_.selectionModel = new this.selectionModelClass_();
this.table_.columnModel = new cr.ui.table.TableColumnModel(columns);
this.table_.addEventListener(
@@ -639,7 +639,7 @@
dialogTitle = this.params_.title || defaultTitle;
this.dialogDom_.querySelector('.dialog-title').textContent = dialogTitle;
- ary = defaultFolder.match(/^\/home\/[^\/]+\/Downloads(\/.*)?$/);
+ ary = defaultFolder.match(/^\/home\/[^\/]+\/user\/Downloads(\/.*)?$/);
if (ary) {
// Chrome will probably suggest the full path to Downloads, but
// we're working with 'virtual paths', so we have to translate.
@@ -1116,22 +1116,11 @@
});
return;
}
-
- // File is some other kind of image, just return the url to the whole
- // thing.
- setTimeout(function() { callback(iconType, entry.toURL()) });
- return;
}
- // If the exif reader worker isn't enabled, read the entire file as a
- // data url instead.
- batchAsyncCall(entry, 'file', function(file) {
- var reader = new FileReader();
-
- reader.onerror = util.ferr('Error reading preview: ' + entry.fullPath);
- reader.onloadend = function(e) { callback(iconType, reader.result) };
- reader.readAsDataURL(file);
- });
+ // File is some other kind of image, just return the url to the whole
+ // thing.
+ setTimeout(function() { callback(iconType, entry.toURL()) });
};
/**
« no previous file with comments | « chrome/browser/resources/file_manager/js/exif_reader.js ('k') | chrome/browser/resources/file_manager/js/harness.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698