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; |
+}; |