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

Unified Diff: content/public/test/fake_download_item.h

Issue 2767373002: Implement GetJobResponse and merge JobData into DataManager. (Closed)
Patch Set: Removed typedef and added DISALLOW_COPY_AND_ASSIGN Created 3 years, 9 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: content/public/test/fake_download_item.h
diff --git a/content/public/test/fake_download_item.h b/content/public/test/fake_download_item.h
index cb3e789aae804dedd649f1a0c7c4ef70062cdc4c..ee988f25919bd99c44eeff80b309449092bab649 100644
--- a/content/public/test/fake_download_item.h
+++ b/content/public/test/fake_download_item.h
@@ -69,6 +69,9 @@ class FakeDownloadItem : public DownloadItem {
void SetLastReason(DownloadInterruptReason last_reason);
DownloadInterruptReason GetLastReason() const override;
+ void SetReceivedBytes(int64_t received_bytes);
+ int64_t GetReceivedBytes() const override;
+
// The methods below are not supported and are not expected to be called.
void ValidateDangerousDownload() override;
void StealDangerousDownload(bool delete_file_afterward,
@@ -110,7 +113,6 @@ class FakeDownloadItem : public DownloadItem {
int PercentComplete() const override;
bool AllDataSaved() const override;
int64_t GetTotalBytes() const override;
- int64_t GetReceivedBytes() const override;
const std::vector<DownloadItem::ReceivedSlice>& GetReceivedSlices()
const override;
bool CanShowInFolder() override;
@@ -145,6 +147,7 @@ class FakeDownloadItem : public DownloadItem {
GURL original_url_;
DownloadInterruptReason last_reason_ =
DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE;
+ int64_t received_bytes_ = 0;
// The members below are to be returned by methods, which return by reference.
std::string dummy_string;
« no previous file with comments | « content/browser/background_fetch/background_fetch_request_info.cc ('k') | content/public/test/fake_download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698