| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 } | 344 } |
| 345 } | 345 } |
| 346 | 346 |
| 347 void DownloadFileImpl::SendUpdate() { | 347 void DownloadFileImpl::SendUpdate() { |
| 348 BrowserThread::PostTask( | 348 BrowserThread::PostTask( |
| 349 BrowserThread::UI, | 349 BrowserThread::UI, |
| 350 FROM_HERE, | 350 FROM_HERE, |
| 351 base::Bind(&DownloadDestinationObserver::DestinationUpdate, | 351 base::Bind(&DownloadDestinationObserver::DestinationUpdate, |
| 352 observer_, | 352 observer_, |
| 353 file_.bytes_so_far(), | 353 file_.bytes_so_far(), |
| 354 rate_estimator_.GetCountPerSecond())); | 354 rate_estimator_.GetCountPerSecond(), |
| 355 std::vector<DownloadItem::ReceivedSlice>())); |
| 355 } | 356 } |
| 356 | 357 |
| 357 DownloadFileImpl::RenameParameters::RenameParameters( | 358 DownloadFileImpl::RenameParameters::RenameParameters( |
| 358 RenameOption option, | 359 RenameOption option, |
| 359 const base::FilePath& new_path, | 360 const base::FilePath& new_path, |
| 360 const RenameCompletionCallback& completion_callback) | 361 const RenameCompletionCallback& completion_callback) |
| 361 : option(option), | 362 : option(option), |
| 362 new_path(new_path), | 363 new_path(new_path), |
| 363 retries_left(kMaxRenameRetries), | 364 retries_left(kMaxRenameRetries), |
| 364 completion_callback(completion_callback) {} | 365 completion_callback(completion_callback) {} |
| 365 | 366 |
| 366 DownloadFileImpl::RenameParameters::~RenameParameters() {} | 367 DownloadFileImpl::RenameParameters::~RenameParameters() {} |
| 367 | 368 |
| 368 } // namespace content | 369 } // namespace content |
| OLD | NEW |