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

Unified Diff: chrome/browser/download/download_item.h

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: is_path_exists_ => file_exists_, aggregate scattered AddObserver()s into one AddObserver() 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/download/download_item.h
diff --git a/chrome/browser/download/download_item.h b/chrome/browser/download/download_item.h
index aafab618660ffba44e9cfa8be88381a38501bcf3..f2e50b0beb5546df7e1c051dc121db7f34afd320 100644
--- a/chrome/browser/download/download_item.h
+++ b/chrome/browser/download/download_item.h
@@ -116,6 +116,7 @@ class DownloadItem {
~DownloadItem();
void AddObserver(Observer* observer);
+ bool HasObserver(Observer* observer);
void RemoveObserver(Observer* observer);
// Notifies our observers periodically.
@@ -259,6 +260,10 @@ class DownloadItem {
void set_open_when_complete(bool open) { open_when_complete_ = open; }
int render_process_id() const { return render_process_id_; }
int request_id() const { return request_id_; }
+ bool file_exists() const { return file_exists_; }
+ void set_file_exists(bool file_exists) {
+ file_exists_ = file_exists;
+ }
SafetyState safety_state() const { return safety_state_; }
void set_safety_state(SafetyState safety_state) {
safety_state_ = safety_state;
@@ -365,6 +370,9 @@ class DownloadItem {
// A flag for indicating if the download should be opened at completion.
bool open_when_complete_;
+ // A flag for indicating if the downloaded path exists or not.
Paweł Hajdan Jr. 2011/05/10 11:37:51 nit: Please remove "or not", and replace "path" wi
+ bool file_exists_;
+
// Whether the download is considered potentially safe or dangerous
// (executable files are typically considered dangerous).
SafetyState safety_state_;

Powered by Google App Engine
This is Rietveld 408576698