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

Unified Diff: content/browser/download/mhtml_generation_manager.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
« no previous file with comments | « content/browser/download/drag_download_util.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/mhtml_generation_manager.cc
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index 6c14c3be62a3f65b0444cfcc32965a21a617fb55..9937db7b2062c785acc8da25c75d45085c7a757e 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -6,6 +6,7 @@
#include <map>
#include <queue>
+#include <utility>
#include "base/bind.h"
#include "base/files/file.h"
@@ -33,7 +34,7 @@ class MHTMLGenerationManager::Job : public RenderProcessHostObserver {
Job(int job_id, WebContents* web_contents, GenerateMHTMLCallback callback);
~Job() override;
- void set_browser_file(base::File file) { browser_file_ = file.Pass(); }
+ void set_browser_file(base::File file) { browser_file_ = std::move(file); }
GenerateMHTMLCallback callback() const { return callback_; }
@@ -202,7 +203,7 @@ void MHTMLGenerationManager::Job::CloseFile(
BrowserThread::PostTaskAndReplyWithResult(
BrowserThread::FILE, FROM_HERE,
base::Bind(&MHTMLGenerationManager::Job::CloseFileOnFileThread,
- base::Passed(browser_file_.Pass())),
+ base::Passed(std::move(browser_file_))),
callback);
}
@@ -300,7 +301,7 @@ base::File MHTMLGenerationManager::CreateFile(const base::FilePath& file_path) {
LOG(ERROR) << "Failed to create file to save MHTML at: " <<
file_path.value();
}
- return browser_file.Pass();
+ return browser_file;
}
void MHTMLGenerationManager::OnFileAvailable(int job_id,
@@ -317,7 +318,7 @@ void MHTMLGenerationManager::OnFileAvailable(int job_id,
if (!job)
return;
- job->set_browser_file(browser_file.Pass());
+ job->set_browser_file(std::move(browser_file));
if (!job->SendToNextRenderFrame()) {
JobFinished(job_id, JobStatus::FAILURE);
« no previous file with comments | « content/browser/download/drag_download_util.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698