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

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

Issue 153663002: Files.app: Clear the sync message after completion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« 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: chrome/browser/resources/file_manager/background/js/drive_sync_handler.js
diff --git a/chrome/browser/resources/file_manager/background/js/drive_sync_handler.js b/chrome/browser/resources/file_manager/background/js/drive_sync_handler.js
index c9c4f3a47266aae20dc7ec12aa9b996edc642252..97ea2e21355980c2a8b2fe614301569e247bdc75 100644
--- a/chrome/browser/resources/file_manager/background/js/drive_sync_handler.js
+++ b/chrome/browser/resources/file_manager/background/js/drive_sync_handler.js
@@ -109,22 +109,24 @@ DriveSyncHandler.prototype.onFileTransfersUpdated_ = function(statusList) {
*/
DriveSyncHandler.prototype.updateItem_ = function(status) {
this.queue_.run(function(callback) {
- if (!this.items_[status.fileUrl]) {
- webkitResolveLocalFileSystemURL(status.fileUrl, function(entry) {
- var item = new ProgressCenterItem();
- item.id =
- DriveSyncHandler.PROGRESS_ITEM_ID_PREFIX + (this.idCounter_++);
- item.type = ProgressItemType.SYNC;
- item.quiet = true;
- item.message = strf('SYNC_FILE_NAME', entry.name);
- item.cancelCallback = this.requestCancel_.bind(this, entry);
- this.items_[status.fileUrl] = item;
- callback();
- }.bind(this), function(error) {
- console.warn('Resolving URL ' + status.fileUrl + ' is failed: ', error);
- callback();
- });
+ if (this.items_[status.fileUrl]) {
+ callback();
+ return;
}
+ webkitResolveLocalFileSystemURL(status.fileUrl, function(entry) {
+ var item = new ProgressCenterItem();
+ item.id =
+ DriveSyncHandler.PROGRESS_ITEM_ID_PREFIX + (this.idCounter_++);
+ item.type = ProgressItemType.SYNC;
+ item.quiet = true;
+ item.message = strf('SYNC_FILE_NAME', entry.name);
+ item.cancelCallback = this.requestCancel_.bind(this, entry);
+ this.items_[status.fileUrl] = item;
+ callback();
+ }.bind(this), function(error) {
+ console.warn('Resolving URL ' + status.fileUrl + ' is failed: ', error);
+ callback();
+ });
}.bind(this));
this.queue_.run(function(callback) {
var item = this.items_[status.fileUrl];
« 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