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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.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: Correct typos Created 9 years, 7 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/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 75209330acf6281ba5b485dfafc317ea080ddd0d..94f96e0353f3aa3adcf4edbc5cc9dcc4e7792b7d 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -146,6 +146,13 @@ void DownloadsDOMHandler::HandleGetDownloads(const ListValue* args) {
} else {
SendCurrentDownloads();
}
+
+ for (OrderedDownloads::iterator it = download_items_.begin();
+ it != download_items_.end(); ++it) {
+ if ((*it)->IsComplete() && (*it)->is_path_exists())
+ (*it)->AddObserver(this);
Paweł Hajdan Jr. 2011/05/10 07:59:46 This AddObserver logic getting scattered across ev
+ }
+ download_manager_->CheckExistingPaths();
}
void DownloadsDOMHandler::HandleOpenFile(const ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698