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

Unified Diff: content/browser/download/download_item_impl.h

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r168573 Created 8 years, 1 month 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: content/browser/download/download_item_impl.h
diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h
index 419f72b09b61a089c26ee9312f79473dbcfcd979..797c798bda9e7ab50833b635c7af1379a172d8cc 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -41,7 +41,15 @@ class CONTENT_EXPORT DownloadItemImpl
// |bound_net_log| is constructed externally for our use.
DownloadItemImpl(DownloadItemImplDelegate* delegate,
DownloadId download_id,
- const DownloadPersistentStoreInfo& info,
+ const FilePath& path,
+ const GURL& url,
+ const GURL& referrer_url,
+ const base::Time& start_time,
+ const base::Time& end_time,
+ int64 received_bytes,
+ int64 total_bytes,
+ DownloadItem::DownloadState state,
+ bool opened,
const net::BoundNetLog& bound_net_log);
// Constructing for a regular download.
@@ -75,12 +83,10 @@ class CONTENT_EXPORT DownloadItemImpl
virtual void ShowDownloadInShell() OVERRIDE;
virtual int32 GetId() const OVERRIDE;
virtual DownloadId GetGlobalId() const OVERRIDE;
- virtual int64 GetDbHandle() const OVERRIDE;
virtual DownloadState GetState() const OVERRIDE;
virtual DownloadInterruptReason GetLastReason() const OVERRIDE;
virtual bool IsPaused() const OVERRIDE;
virtual bool IsTemporary() const OVERRIDE;
- virtual bool IsPersisted() const OVERRIDE;
virtual bool IsPartialDownload() const OVERRIDE;
virtual bool IsInProgress() const OVERRIDE;
virtual bool IsCancelled() const OVERRIDE;
@@ -126,7 +132,6 @@ class CONTENT_EXPORT DownloadItemImpl
virtual bool GetOpenWhenComplete() const OVERRIDE;
virtual bool GetAutoOpened() OVERRIDE;
virtual bool GetOpened() const OVERRIDE;
- virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const OVERRIDE;
virtual BrowserContext* GetBrowserContext() const OVERRIDE;
virtual WebContents* GetWebContents() const OVERRIDE;
virtual void OnContentCheckCompleted(DownloadDangerType danger_type) OVERRIDE;
@@ -188,12 +193,6 @@ class CONTENT_EXPORT DownloadItemImpl
// should be considered complete.
virtual void MarkAsComplete();
- // Interactions with persistence system --------------------------------------
-
- // TODO(benjhayden): Remove when DownloadHistory becomes an observer.
- virtual void SetIsPersisted();
- virtual void SetDbHandle(int64 handle);
-
private:
// Fine grained states of a download.
enum DownloadInternalState {
@@ -420,9 +419,6 @@ class CONTENT_EXPORT DownloadItemImpl
// Time the download completed.
base::Time end_time_;
- // Our persistent store handle.
- int64 db_handle_;
-
// Our delegate.
DownloadItemImplDelegate* delegate_;
@@ -444,8 +440,6 @@ class CONTENT_EXPORT DownloadItemImpl
// before the observer is added.
bool auto_opened_;
- bool is_persisted_;
-
// True if the item was downloaded temporarily.
bool is_temporary_;

Powered by Google App Engine
This is Rietveld 408576698