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

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

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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 | « content/browser/download/download_item_factory.h ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c899f25016b113ef24356a9f5cb565b2d8be20e4..47a0b0b6f4fcca54e58ef085d1765eff0828a548 100644
--- a/content/browser/download/download_item_impl.h
+++ b/content/browser/download/download_item_impl.h
@@ -51,30 +51,32 @@ class CONTENT_EXPORT DownloadItemImpl
// Constructing from persistent store:
// |net_log| is constructed externally for our use.
- DownloadItemImpl(DownloadItemImplDelegate* delegate,
- const std::string& guid,
- uint32_t id,
- const base::FilePath& current_path,
- const base::FilePath& target_path,
- const std::vector<GURL>& url_chain,
- const GURL& referrer_url,
- const GURL& site_url,
- const GURL& tab_url,
- const GURL& tab_referrer_url,
- const std::string& mime_type,
- const std::string& original_mime_type,
- const base::Time& start_time,
- const base::Time& end_time,
- const std::string& etag,
- const std::string& last_modified,
- int64_t received_bytes,
- int64_t total_bytes,
- const std::string& hash,
- DownloadItem::DownloadState state,
- DownloadDangerType danger_type,
- DownloadInterruptReason interrupt_reason,
- bool opened,
- const net::NetLogWithSource& net_log);
+ DownloadItemImpl(
+ DownloadItemImplDelegate* delegate,
+ const std::string& guid,
+ uint32_t id,
+ const base::FilePath& current_path,
+ const base::FilePath& target_path,
+ const std::vector<GURL>& url_chain,
+ const GURL& referrer_url,
+ const GURL& site_url,
+ const GURL& tab_url,
+ const GURL& tab_referrer_url,
+ const std::string& mime_type,
+ const std::string& original_mime_type,
+ const base::Time& start_time,
+ const base::Time& end_time,
+ const std::string& etag,
+ const std::string& last_modified,
+ int64_t received_bytes,
+ int64_t total_bytes,
+ const std::string& hash,
+ DownloadItem::DownloadState state,
+ DownloadDangerType danger_type,
+ DownloadInterruptReason interrupt_reason,
+ bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
+ const net::NetLogWithSource& net_log);
// Constructing for a regular download.
// |net_log| is constructed externally for our use.
@@ -150,6 +152,8 @@ class CONTENT_EXPORT DownloadItemImpl
bool AllDataSaved() const override;
int64_t GetTotalBytes() const override;
int64_t GetReceivedBytes() const override;
+ const std::vector<DownloadItem::ReceivedSlice>& GetReceivedSlices()
+ const override;
base::Time GetStartTime() const override;
base::Time GetEndTime() const override;
bool CanShowInFolder() override;
@@ -674,6 +678,9 @@ class CONTENT_EXPORT DownloadItemImpl
// Server's ETAG for the file.
std::string etag_;
+ // The data slices that have been received so far.
+ std::vector<DownloadItem::ReceivedSlice> received_slices_;
+
// Net log to use for this download.
const net::NetLogWithSource net_log_;
« no previous file with comments | « content/browser/download/download_item_factory.h ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698