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

Unified Diff: chrome/chrome_watcher/chrome_watcher_main.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 months 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: chrome/chrome_watcher/chrome_watcher_main.cc
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index 2bf2151b64a9c49d8d0246144ef336bbdcc57204..18f4b5ab245fd150c3fa157af784c4c66ea892b1 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -5,6 +5,8 @@
#include <windows.h>
#include <sddl.h>
+#include <utility>
+
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -117,7 +119,7 @@ bool BrowserMonitor::StartWatching(
const base::char16* registry_path,
base::Process process,
base::win::ScopedHandle on_initialized_event) {
- if (!exit_code_watcher_.Initialize(process.Pass()))
+ if (!exit_code_watcher_.Initialize(std::move(process)))
return false;
if (!background_thread_.StartWithOptions(
@@ -127,7 +129,7 @@ bool BrowserMonitor::StartWatching(
if (!background_thread_.task_runner()->PostTask(
FROM_HERE, base::Bind(&BrowserMonitor::Watch, base::Unretained(this),
- base::Passed(on_initialized_event.Pass())))) {
+ base::Passed(&on_initialized_event)))) {
background_thread_.Stop();
return false;
}
@@ -414,7 +416,7 @@ extern "C" int WatcherMain(const base::char16* registry_path,
base::RunLoop run_loop;
BrowserMonitor monitor(&run_loop, registry_path);
if (!monitor.StartWatching(registry_path, process.Duplicate(),
- on_initialized_event.Pass())) {
+ std::move(on_initialized_event))) {
return 1;
}
« no previous file with comments | « chrome/browser/ui/views/status_icons/status_tray_win_unittest.cc ('k') | chrome/installer/test/alternate_version_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698