Index: chrome/browser/resources/downloads.html |
diff --git a/chrome/browser/resources/downloads.html b/chrome/browser/resources/downloads.html |
index 97952fb100f85921057740fafdb1cd68970fc648..3d2d11616ed7497b16610bd949c8fac7e730322f 100644 |
--- a/chrome/browser/resources/downloads.html |
+++ b/chrome/browser/resources/downloads.html |
@@ -463,6 +463,7 @@ Download.States = { |
IN_PROGRESS : "IN_PROGRESS", |
CANCELLED : "CANCELLED", |
COMPLETE : "COMPLETE", |
+ REMOVED : "REMOVED", |
PAUSED : "PAUSED", |
DANGEROUS : "DANGEROUS", |
INTERRUPTED : "INTERRUPTED", |
@@ -499,7 +500,11 @@ Download.prototype.update = function(download) { |
this.filePath_ = download.file_path; |
this.fileName_ = download.file_name; |
this.url_ = download.url; |
- this.state_ = download.state; |
+ // TODO(haraken): This code is tricky and should be refined. |
+ // See http://crbug.com/82531 |
Randy Smith (Not in Mondays)
2011/05/13 20:45:32
To add a little more meat to my earlier suggestion
haraken1
2011/05/16 11:42:27
That's a great solution!!! I fixed it using a FIFO
|
+ if (this.state_ != Download.States.REMOVED) { |
+ this.state_ = download.state; |
+ } |
this.dangerType_ = download.danger_type; |
this.since_ = download.since_string; |
@@ -617,6 +622,8 @@ Download.prototype.getStatusText_ = function() { |
return this.progressStatusText_; |
case Download.States.CANCELLED: |
return localStrings.getString('status_cancelled'); |
+ case Download.States.REMOVED: |
+ return localStrings.getString('status_removed'); |
case Download.States.PAUSED: |
return localStrings.getString('status_paused'); |
case Download.States.DANGEROUS: |