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

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

Issue 12304013: Introduce Image loader extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified. Created 7 years, 10 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/image_editor/image_util.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/image_util.js b/chrome/browser/resources/file_manager/js/image_editor/image_util.js
index 39e375b841086ad2b752d8678e89e83547bc1f3c..acdbb81e51b3c7534a087552c27456e3445e1ea8 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/image_util.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/image_util.js
@@ -487,7 +487,7 @@ ImageUtil.ImageLoader.prototype.load = function(
// errorCallback has an optional error argument, which in case of general
// error should not be specified
this.image_.onerror = errorCallback.bind(this, 'IMAGE_ERROR');
- this.remoteLoader_ = util.loadImage(this.image_, url);
+ this.taskId_ = util.loadImage(this.image_, url);
}.bind(this);
if (opt_delay) {
this.timeout_ = setTimeout(startLoad, opt_delay);
@@ -533,10 +533,8 @@ ImageUtil.ImageLoader.prototype.cancel = function() {
this.image_.onerror = function() {};
this.image_.src = '';
}
- if (this.remoteLoader_) {
- this.remoteLoader_.cancel();
- this.remoteLoader_ = null;
- }
+ if (this.taskId_)
+ util.cancelLoadImage(this.taskId_);
this.generation_++; // Silence the transform fetcher if it is in progress.
};
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_selection.js ('k') | chrome/browser/resources/file_manager/js/main_scripts.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698