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

Unified Diff: content/browser/download/drag_download_file.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/drag_download_file.cc
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 3d8c0fcb772b7f8af6da65d0ad6c14b68318dbef..afb533a56bf74dd30e68ba73f3f35185b55f2c4b 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -4,6 +4,8 @@
#include "content/browser/download/drag_download_file.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/files/file.h"
#include "base/location.h"
@@ -70,8 +72,8 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
params->set_callback(base::Bind(&DragDownloadFileUI::OnDownloadStarted,
weak_ptr_factory_.GetWeakPtr()));
params->set_file_path(file_path);
- params->set_file(file.Pass()); // Nulls file.
- download_manager->DownloadUrl(params.Pass());
+ params->set_file(std::move(file)); // Nulls file.
+ download_manager->DownloadUrl(std::move(params));
}
void Cancel() {
@@ -161,7 +163,7 @@ DragDownloadFile::DragDownloadFile(const base::FilePath& file_path,
const std::string& referrer_encoding,
WebContents* web_contents)
: file_path_(file_path),
- file_(file.Pass()),
+ file_(std::move(file)),
drag_message_loop_(base::MessageLoop::current()),
state_(INITIALIZED),
drag_ui_(NULL),
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | content/browser/download/drag_download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698