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

Unified Diff: ui/file_manager/gallery/js/slide_mode.js

Issue 1006833002: Gallery.app : shows an error message when it fails to save an image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed string resource. Created 5 years, 9 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 | « ui/file_manager/gallery/js/gallery_item.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/slide_mode.js
diff --git a/ui/file_manager/gallery/js/slide_mode.js b/ui/file_manager/gallery/js/slide_mode.js
index e5efc167bc3fd2ff463db1e9f63b9b8ff54492e4..f8f7555db00a20049c4a7e1623b9201ff1de2756 100644
--- a/ui/file_manager/gallery/js/slide_mode.js
+++ b/ui/file_manager/gallery/js/slide_mode.js
@@ -1263,11 +1263,7 @@ SlideMode.prototype.saveCurrentImage_ = function(item, callback) {
this.imageView_.getCanvas(),
this.shouldOverwriteOriginal_());
- savedPromise.catch(function(error) {
- // TODO(hirono): Implement write error handling.
- // Until then pretend that the save succeeded.
- console.error(error.stack || error);
- }).then(function() {
+ savedPromise.then(function() {
this.showSpinner_(false);
this.flashSavedLabel_();
@@ -1282,10 +1278,14 @@ SlideMode.prototype.saveCurrentImage_ = function(item, callback) {
ImageUtil.metrics.recordUserAction(ImageUtil.getMetricName('Edit'));
callback();
- cr.dispatchSimpleEvent(this, 'image-saved');
}.bind(this)).catch(function(error) {
console.error(error.stack || error);
- });
+
+ this.showSpinner_(false);
+ this.errorBanner_.show('GALLERY_SAVE_FAILED');
+
+ callback();
+ }.bind(this));
};
/**
« no previous file with comments | « ui/file_manager/gallery/js/gallery_item.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698