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

Unified Diff: chrome/browser/download/download_util.cc

Issue 6905049: Detect removed files and reflect the state in chrome://downloads and the download shelf (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with the latest revision Created 9 years, 6 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 | « chrome/browser/download/download_shelf_context_menu.cc ('k') | chrome/browser/resources/downloads.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 88801eabbef60c309ce8503464c8c6fca107e7fd..cf8d1c4eaa25dad248d9fdf995cb62eaf4341316 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -665,6 +665,8 @@ DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) {
file_value->SetString("url", download->GetURL().spec());
file_value->SetBoolean("otr", download->is_otr());
file_value->SetInteger("total", static_cast<int>(download->total_bytes()));
+ file_value->SetBoolean("file_externally_removed",
+ download->file_externally_removed());
if (download->IsInProgress()) {
if (download->safety_state() == DownloadItem::DANGEROUS) {
@@ -701,11 +703,10 @@ DictionaryValue* CreateDownloadItemValue(DownloadItem* download, int id) {
} else if (download->IsCancelled()) {
file_value->SetString("state", "CANCELLED");
} else if (download->IsComplete()) {
- if (download->safety_state() == DownloadItem::DANGEROUS) {
+ if (download->safety_state() == DownloadItem::DANGEROUS)
file_value->SetString("state", "DANGEROUS");
- } else {
+ else
file_value->SetString("state", "COMPLETE");
- }
} else if (download->state() == DownloadItem::REMOVING) {
file_value->SetString("state", "REMOVING");
} else {
« no previous file with comments | « chrome/browser/download/download_shelf_context_menu.cc ('k') | chrome/browser/resources/downloads.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698