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

Side by Side Diff: content/browser/download/mock_download_file.cc

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DownloadSaveInfo::offset is now int64. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/download/mock_download_file.h" 5 #include "content/browser/download/mock_download_file.h"
6 6
7 #include "content/browser/download/download_create_info.h" 7 #include "content/browser/download/download_create_info.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 MockDownloadFile::StatisticsRecorder::StatisticsRecorder() { 10 MockDownloadFile::StatisticsRecorder::StatisticsRecorder() {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 int64 MockDownloadFile::BytesSoFar() const { 102 int64 MockDownloadFile::BytesSoFar() const {
103 return data_.length(); 103 return data_.length();
104 } 104 }
105 105
106 bool MockDownloadFile::GetSha256Hash(std::string* hash) { 106 bool MockDownloadFile::GetSha256Hash(std::string* hash) {
107 return false; 107 return false;
108 } 108 }
109 109
110 std::string MockDownloadFile::GetSha256HashState() {
111 return "";
112 }
113
110 // DownloadFileInterface implementation. 114 // DownloadFileInterface implementation.
111 void MockDownloadFile::CancelDownloadRequest() { 115 void MockDownloadFile::CancelDownloadRequest() {
112 } 116 }
113 117
114 int MockDownloadFile::Id() const { 118 int MockDownloadFile::Id() const {
115 return id_.local(); 119 return id_.local();
116 } 120 }
117 121
118 DownloadManager* MockDownloadFile::GetDownloadManager() { 122 DownloadManager* MockDownloadFile::GetDownloadManager() {
119 return download_manager_; 123 return download_manager_;
120 } 124 }
121 125
122 const DownloadId& MockDownloadFile::GlobalId() const { 126 const DownloadId& MockDownloadFile::GlobalId() const {
123 return id_; 127 return id_;
124 } 128 }
125 129
126 std::string MockDownloadFile::DebugString() const { 130 std::string MockDownloadFile::DebugString() const {
127 return ""; 131 return "";
128 } 132 }
129 133
130 void MockDownloadFile::SetExpectedPath(size_t index, const FilePath& path) { 134 void MockDownloadFile::SetExpectedPath(size_t index, const FilePath& path) {
131 if (expected_rename_path_list_.size() < index + 1) 135 if (expected_rename_path_list_.size() < index + 1)
132 expected_rename_path_list_.resize(index + 1); 136 expected_rename_path_list_.resize(index + 1);
133 expected_rename_path_list_[index] = path; 137 expected_rename_path_list_[index] = path;
134 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698