| Index: content/browser/download/download_file_impl.cc
|
| diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
|
| index 0243d787d33afda1aef85af47bf92ae1d248d5f7..1045aabc1b599c26ede345b2f0e1cb64b9ddca05 100644
|
| --- a/content/browser/download/download_file_impl.cc
|
| +++ b/content/browser/download/download_file_impl.cc
|
| @@ -16,11 +16,14 @@ using content::BrowserThread;
|
| DownloadFileImpl::DownloadFileImpl(
|
| const DownloadCreateInfo* info,
|
| DownloadRequestHandleInterface* request_handle,
|
| - DownloadManager* download_manager)
|
| + DownloadManager* download_manager,
|
| + bool calculate_hash)
|
| : file_(info->save_info.file_path,
|
| info->url(),
|
| info->referrer_url,
|
| info->received_bytes,
|
| + calculate_hash,
|
| + info->save_info.hash_state,
|
| info->save_info.file_stream),
|
| id_(info->download_id),
|
| request_handle_(request_handle),
|
| @@ -33,8 +36,8 @@ DownloadFileImpl::~DownloadFileImpl() {
|
| }
|
|
|
| // BaseFile delegated functions.
|
| -net::Error DownloadFileImpl::Initialize(bool calculate_hash) {
|
| - return file_.Initialize(calculate_hash);
|
| +net::Error DownloadFileImpl::Initialize() {
|
| + return file_.Initialize();
|
| }
|
|
|
| net::Error DownloadFileImpl::AppendDataToFile(const char* data,
|
| @@ -78,8 +81,12 @@ int64 DownloadFileImpl::CurrentSpeed() const {
|
| return file_.CurrentSpeed();
|
| }
|
|
|
| -bool DownloadFileImpl::GetSha256Hash(std::string* hash) {
|
| - return file_.GetSha256Hash(hash);
|
| +bool DownloadFileImpl::GetHash(std::string* hash) {
|
| + return file_.GetHash(hash);
|
| +}
|
| +
|
| +std::string DownloadFileImpl::GetHashState() {
|
| + return file_.GetHashState();
|
| }
|
|
|
| // DownloadFileInterface implementation.
|
|
|