OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/download_file_impl.h" | 5 #include "content/browser/download/download_file_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 221 } |
222 | 222 |
223 base::FilePath DownloadFileImpl::FullPath() const { | 223 base::FilePath DownloadFileImpl::FullPath() const { |
224 return file_.full_path(); | 224 return file_.full_path(); |
225 } | 225 } |
226 | 226 |
227 bool DownloadFileImpl::InProgress() const { | 227 bool DownloadFileImpl::InProgress() const { |
228 return file_.in_progress(); | 228 return file_.in_progress(); |
229 } | 229 } |
230 | 230 |
231 int64 DownloadFileImpl::CurrentSpeed() const { | 231 int64_t DownloadFileImpl::CurrentSpeed() const { |
232 return rate_estimator_.GetCountPerSecond(); | 232 return rate_estimator_.GetCountPerSecond(); |
233 } | 233 } |
234 | 234 |
235 bool DownloadFileImpl::GetHash(std::string* hash) { | 235 bool DownloadFileImpl::GetHash(std::string* hash) { |
236 return file_.GetHash(hash); | 236 return file_.GetHash(hash); |
237 } | 237 } |
238 | 238 |
239 std::string DownloadFileImpl::GetHashState() { | 239 std::string DownloadFileImpl::GetHashState() { |
240 return file_.GetHashState(); | 240 return file_.GetHashState(); |
241 } | 241 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 observer_, file_.bytes_so_far(), CurrentSpeed(), | 352 observer_, file_.bytes_so_far(), CurrentSpeed(), |
353 GetHashState())); | 353 GetHashState())); |
354 } | 354 } |
355 | 355 |
356 // static | 356 // static |
357 int DownloadFile::GetNumberOfDownloadFiles() { | 357 int DownloadFile::GetNumberOfDownloadFiles() { |
358 return number_active_objects_; | 358 return number_active_objects_; |
359 } | 359 } |
360 | 360 |
361 } // namespace content | 361 } // namespace content |
OLD | NEW |