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

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: Rearranged structures for greater consistency. 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
114 bool MockDownloadFile::SetSha256HashState(const std::string& hash_state) {
115 return false;
116 }
117
110 // DownloadFileInterface implementation. 118 // DownloadFileInterface implementation.
111 void MockDownloadFile::CancelDownloadRequest() { 119 void MockDownloadFile::CancelDownloadRequest() {
112 } 120 }
113 121
114 int MockDownloadFile::Id() const { 122 int MockDownloadFile::Id() const {
115 return id_.local(); 123 return id_.local();
116 } 124 }
117 125
118 DownloadManager* MockDownloadFile::GetDownloadManager() { 126 DownloadManager* MockDownloadFile::GetDownloadManager() {
119 return download_manager_; 127 return download_manager_;
120 } 128 }
121 129
122 const DownloadId& MockDownloadFile::GlobalId() const { 130 const DownloadId& MockDownloadFile::GlobalId() const {
123 return id_; 131 return id_;
124 } 132 }
125 133
126 std::string MockDownloadFile::DebugString() const { 134 std::string MockDownloadFile::DebugString() const {
127 return ""; 135 return "";
128 } 136 }
129 137
130 void MockDownloadFile::SetExpectedPath(size_t index, const FilePath& path) { 138 void MockDownloadFile::SetExpectedPath(size_t index, const FilePath& path) {
131 if (expected_rename_path_list_.size() < index + 1) 139 if (expected_rename_path_list_.size() < index + 1)
132 expected_rename_path_list_.resize(index + 1); 140 expected_rename_path_list_.resize(index + 1);
133 expected_rename_path_list_[index] = path; 141 expected_rename_path_list_[index] = path;
134 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698