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

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

Issue 2880933002: Download driver for components/download. (Closed)
Patch Set: Polish comment. Created 3 years, 7 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
« no previous file with comments | « content/public/test/fake_download_item.h ('k') | content/public/test/mock_download_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/http/http_response_headers.h" 8 #include "net/http/http_response_headers.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 const GURL& FakeDownloadItem::GetOriginalUrl() const { 152 const GURL& FakeDownloadItem::GetOriginalUrl() const {
153 return original_url_; 153 return original_url_;
154 } 154 }
155 155
156 void FakeDownloadItem::SetReceivedBytes(int64_t received_bytes) { 156 void FakeDownloadItem::SetReceivedBytes(int64_t received_bytes) {
157 received_bytes_ = received_bytes; 157 received_bytes_ = received_bytes;
158 } 158 }
159 159
160 void FakeDownloadItem::SetTotalBytes(int64_t total_bytes) {
161 total_bytes_ = total_bytes;
162 }
163
160 int64_t FakeDownloadItem::GetReceivedBytes() const { 164 int64_t FakeDownloadItem::GetReceivedBytes() const {
161 return received_bytes_; 165 return received_bytes_;
162 } 166 }
163 167
164 void FakeDownloadItem::SetLastAccessTime(base::Time time) { 168 void FakeDownloadItem::SetLastAccessTime(base::Time time) {
165 last_access_time_ = time; 169 last_access_time_ = time;
166 } 170 }
167 171
168 base::Time FakeDownloadItem::GetLastAccessTime() const { 172 base::Time FakeDownloadItem::GetLastAccessTime() const {
169 return last_access_time_; 173 return last_access_time_;
(...skipping 29 matching lines...) Expand all
199 203
200 void FakeDownloadItem::OpenDownload() { 204 void FakeDownloadItem::OpenDownload() {
201 NOTREACHED(); 205 NOTREACHED();
202 } 206 }
203 207
204 void FakeDownloadItem::ShowDownloadInShell() { 208 void FakeDownloadItem::ShowDownloadInShell() {
205 NOTREACHED(); 209 NOTREACHED();
206 } 210 }
207 211
208 bool FakeDownloadItem::IsPaused() const { 212 bool FakeDownloadItem::IsPaused() const {
209 NOTREACHED();
210 return false; 213 return false;
211 } 214 }
212 215
213 bool FakeDownloadItem::IsTemporary() const { 216 bool FakeDownloadItem::IsTemporary() const {
214 NOTREACHED(); 217 NOTREACHED();
215 return false; 218 return false;
216 } 219 }
217 220
218 bool FakeDownloadItem::CanResume() const { 221 bool FakeDownloadItem::CanResume() const {
219 NOTREACHED(); 222 NOTREACHED();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 NOTREACHED(); 347 NOTREACHED();
345 return 1; 348 return 1;
346 } 349 }
347 350
348 bool FakeDownloadItem::AllDataSaved() const { 351 bool FakeDownloadItem::AllDataSaved() const {
349 NOTREACHED(); 352 NOTREACHED();
350 return true; 353 return true;
351 } 354 }
352 355
353 int64_t FakeDownloadItem::GetTotalBytes() const { 356 int64_t FakeDownloadItem::GetTotalBytes() const {
354 NOTREACHED(); 357 return total_bytes_;
355 return 1;
356 } 358 }
357 359
358 const std::vector<DownloadItem::ReceivedSlice>& 360 const std::vector<DownloadItem::ReceivedSlice>&
359 FakeDownloadItem::GetReceivedSlices() const { 361 FakeDownloadItem::GetReceivedSlices() const {
360 NOTREACHED(); 362 NOTREACHED();
361 static const std::vector<DownloadItem::ReceivedSlice> slices; 363 static const std::vector<DownloadItem::ReceivedSlice> slices;
362 return slices; 364 return slices;
363 } 365 }
364 366
365 bool FakeDownloadItem::CanShowInFolder() { 367 bool FakeDownloadItem::CanShowInFolder() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) { 424 void FakeDownloadItem::SetDisplayName(const base::FilePath& name) {
423 NOTREACHED(); 425 NOTREACHED();
424 } 426 }
425 427
426 std::string FakeDownloadItem::DebugString(bool verbose) const { 428 std::string FakeDownloadItem::DebugString(bool verbose) const {
427 NOTREACHED(); 429 NOTREACHED();
428 return std::string(); 430 return std::string();
429 } 431 }
430 432
431 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/fake_download_item.h ('k') | content/public/test/mock_download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698