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

Side by Side Diff: content/public/test/fake_download_item.cc

Issue 2767373002: Implement GetJobResponse and merge JobData into DataManager. (Closed)
Patch Set: cleanup 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/fake_download_item.h" 5 #include "content/public/test/fake_download_item.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 void FakeDownloadItem::SetOriginalUrl(const GURL& url) { 129 void FakeDownloadItem::SetOriginalUrl(const GURL& url) {
130 original_url_ = url; 130 original_url_ = url;
131 } 131 }
132 132
133 const GURL& FakeDownloadItem::GetOriginalUrl() const { 133 const GURL& FakeDownloadItem::GetOriginalUrl() const {
134 return original_url_; 134 return original_url_;
135 } 135 }
136 136
137 void FakeDownloadItem::SetReceivedBytes(int64_t received_bytes) {
Peter Beverloo 2017/03/25 03:38:50 Should this trigger NotifyDownloadUpdated()?
harkness 2017/03/26 16:13:18 It could, but that would break the current model (
138 received_bytes_ = received_bytes;
139 }
140
141 int64_t FakeDownloadItem::GetReceivedBytes() const {
142 return received_bytes_;
143 }
144
137 // The methods below are not supported and are not expected to be called. 145 // The methods below are not supported and are not expected to be called.
138 void FakeDownloadItem::ValidateDangerousDownload() { 146 void FakeDownloadItem::ValidateDangerousDownload() {
139 NOTREACHED(); 147 NOTREACHED();
140 } 148 }
141 149
142 void FakeDownloadItem::StealDangerousDownload( 150 void FakeDownloadItem::StealDangerousDownload(
143 bool delete_file_afterward, 151 bool delete_file_afterward,
144 const AcquireFileCallback& callback) { 152 const AcquireFileCallback& callback) {
145 NOTREACHED(); 153 NOTREACHED();
146 callback.Run(base::FilePath()); 154 callback.Run(base::FilePath());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 bool FakeDownloadItem::AllDataSaved() const { 326 bool FakeDownloadItem::AllDataSaved() const {
319 NOTREACHED(); 327 NOTREACHED();
320 return true; 328 return true;
321 } 329 }
322 330
323 int64_t FakeDownloadItem::GetTotalBytes() const { 331 int64_t FakeDownloadItem::GetTotalBytes() const {
324 NOTREACHED(); 332 NOTREACHED();
325 return 1; 333 return 1;
326 } 334 }
327 335
328 int64_t FakeDownloadItem::GetReceivedBytes() const {
329 NOTREACHED();
330 return 1;
331 }
332
333 const std::vector<DownloadItem::ReceivedSlice>& 336 const std::vector<DownloadItem::ReceivedSlice>&
334 FakeDownloadItem::GetReceivedSlices() const { 337 FakeDownloadItem::GetReceivedSlices() const {
335 NOTREACHED(); 338 NOTREACHED();
336 static const std::vector<DownloadItem::ReceivedSlice> slices; 339 static const std::vector<DownloadItem::ReceivedSlice> slices;
337 return slices; 340 return slices;
338 } 341 }
339 342
340 bool FakeDownloadItem::CanShowInFolder() { 343 bool FakeDownloadItem::CanShowInFolder() {
341 NOTREACHED(); 344 NOTREACHED();
342 return true; 345 return true;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { 404 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) {
402 NOTREACHED(); 405 NOTREACHED();
403 } 406 }
404 407
405 std::string FakeDownloadItem::DebugString(bool verbose) const { 408 std::string FakeDownloadItem::DebugString(bool verbose) const {
406 NOTREACHED(); 409 NOTREACHED();
407 return std::string(); 410 return std::string();
408 } 411 }
409 412
410 } // namespace content 413 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698