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

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

Issue 127763002: Files.app: Make ProgressCenterItemGroup class to manage the states of items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an unused member. Created 6 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: chrome/browser/resources/file_manager/common/js/progress_center_common.js
diff --git a/chrome/browser/resources/file_manager/common/js/progress_center_common.js b/chrome/browser/resources/file_manager/common/js/progress_center_common.js
index 443dc8d08ee4735aa0067b1abaf3a03436cf835f..78ecd5ee3fb7c0f4fc5f59d48b2e3b276ecae128 100644
--- a/chrome/browser/resources/file_manager/common/js/progress_center_common.js
+++ b/chrome/browser/resources/file_manager/common/js/progress_center_common.js
@@ -155,3 +155,20 @@ ProgressCenterItem.prototype = {
!this.summarized);
}
};
+
+/**
+ * Clones the item.
+ * @return {ProgressCenterItem} New item having the same properties with this.
+ */
+ProgressCenterItem.prototype.clone = function() {
+ var newItem = new ProgressCenterItem();
+ newItem.id = this.id;
+ newItem.state = this.state;
+ newItem.message = this.message;
+ newItem.progressMax = this.progressMax;
+ newItem.progressValue = this.progressValue;
+ newItem.type = this.type;
+ newItem.summarized = this.summarized;
+ newItem.cancelCallback = this.cancelCallback;
+ return newItem;
+};

Powered by Google App Engine
This is Rietveld 408576698