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

Unified Diff: content/browser/download/download_item_impl.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 26803f72f8bddee6d6b753de2e62682e00f786b4..cef57731792e96e8832ee0c0962b58a5d0f75b8b 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -23,6 +23,7 @@
#include "content/browser/download/download_item_impl.h"
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -231,7 +232,7 @@ DownloadItemImpl::DownloadItemImpl(
scoped_ptr<DownloadRequestHandleInterface> request_handle,
const net::BoundNetLog& bound_net_log)
: is_save_package_download_(true),
- request_handle_(request_handle.Pass()),
+ request_handle_(std::move(request_handle)),
download_id_(download_id),
current_path_(path),
target_path_(path),
@@ -1116,8 +1117,8 @@ void DownloadItemImpl::Start(
DCHECK(file.get());
DCHECK(req_handle.get());
- download_file_ = file.Pass();
- request_handle_ = req_handle.Pass();
+ download_file_ = std::move(file);
+ request_handle_ = std::move(req_handle);
if (GetState() == CANCELLED) {
// The download was in the process of resuming when it was cancelled. Don't
@@ -1703,7 +1704,7 @@ void DownloadItemImpl::ResumeInterruptedDownload() {
base::Bind(&DownloadItemImpl::OnResumeRequestStarted,
weak_ptr_factory_.GetWeakPtr()));
- delegate_->ResumeInterruptedDownload(download_params.Pass(), GetId());
+ delegate_->ResumeInterruptedDownload(std::move(download_params), GetId());
// Just in case we were interrupted while paused.
is_paused_ = false;
« no previous file with comments | « content/browser/download/download_file_unittest.cc ('k') | content/browser/download/download_item_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698