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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 years, 5 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_history.cc ('k') | chrome/browser/download/download_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_item.h
diff --git a/chrome/browser/download/download_item.h b/chrome/browser/download/download_item.h
index 28afd0716c24b86d4f05477033c2d9f730323711..2c2f33adb0aec4d1e81f163b1bb55e26ed7c8d24 100644
--- a/chrome/browser/download/download_item.h
+++ b/chrome/browser/download/download_item.h
@@ -258,6 +258,10 @@ class DownloadItem : public NotificationObserver {
// Returns true if we have all the data and know the final file name.
bool IsComplete() const;
+ // Returns true if the item is in the history db.
+ bool IsInHistory() const;
+ void SetIsInHistory(bool iih) { is_in_history_ = iih; }
+
// Accessors
DownloadState state() const { return state_; }
const FilePath& full_path() const { return full_path_; }
@@ -280,8 +284,6 @@ class DownloadItem : public NotificationObserver {
int64 received_bytes() const { return received_bytes_; }
int32 id() const { return download_id_; }
base::Time start_time() const { return start_time_; }
- void set_db_handle(int64 handle) { db_handle_ = handle; }
- int64 db_handle() const { return db_handle_; }
bool is_paused() const { return is_paused_; }
bool open_when_complete() const { return open_when_complete_; }
void set_open_when_complete(bool open) { open_when_complete_ = open; }
@@ -372,9 +374,11 @@ class DownloadItem : public NotificationObserver {
// download system.
DownloadRequestHandle request_handle_;
- // Download ID assigned by DownloadResourceHandler.
+ // Download ID assigned by DownloadPrefs. Always unique and persistent.
int32 download_id_;
+ bool is_in_history_;
+
// Full path to the downloaded or downloading file.
FilePath full_path_;
@@ -425,9 +429,6 @@ class DownloadItem : public NotificationObserver {
// Time the download was started
base::Time start_time_;
- // Our persistent store handle
- int64 db_handle_;
-
// Timer for regularly updating our observers
base::RepeatingTimer<DownloadItem> update_timer_;
« no previous file with comments | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698