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

Unified Diff: remoting/host/daemon_process_win.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/desktop_capturer_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process_win.cc
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index 1ac3e7f4ad66db6fa00a9bbde835480a5aea88b5..35f844c29e41e48adc7d8c1992de410932637d09 100644
--- a/remoting/host/daemon_process_win.cc
+++ b/remoting/host/daemon_process_win.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
+#include <memory>
#include <utility>
#include "base/base_switches.h"
@@ -15,7 +16,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/process/process.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
@@ -88,7 +88,7 @@ class DaemonProcessWin : public DaemonProcess {
protected:
// DaemonProcess implementation.
- scoped_ptr<DesktopSession> DoCreateDesktopSession(
+ std::unique_ptr<DesktopSession> DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) override;
@@ -107,7 +107,7 @@ class DaemonProcessWin : public DaemonProcess {
bool OpenPairingRegistry();
private:
- scoped_ptr<WorkerProcessLauncher> network_launcher_;
+ std::unique_ptr<WorkerProcessLauncher> network_launcher_;
// Handle of the network process.
ScopedHandle network_process_;
@@ -192,7 +192,7 @@ bool DaemonProcessWin::OnDesktopSessionAgentAttached(
return true;
}
-scoped_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession(
+std::unique_ptr<DesktopSession> DaemonProcessWin::DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) {
@@ -225,23 +225,22 @@ void DaemonProcessWin::LaunchNetworkProcess() {
return;
}
- scoped_ptr<base::CommandLine> target(new base::CommandLine(host_binary));
+ std::unique_ptr<base::CommandLine> target(new base::CommandLine(host_binary));
target->AppendSwitchASCII(kProcessTypeSwitchName, kProcessTypeHost);
target->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
kCopiedSwitchNames, arraysize(kCopiedSwitchNames));
- scoped_ptr<UnprivilegedProcessDelegate> delegate(
+ std::unique_ptr<UnprivilegedProcessDelegate> delegate(
new UnprivilegedProcessDelegate(io_task_runner(), std::move(target)));
network_launcher_.reset(new WorkerProcessLauncher(std::move(delegate), this));
}
-scoped_ptr<DaemonProcess> DaemonProcess::Create(
+std::unique_ptr<DaemonProcess> DaemonProcess::Create(
scoped_refptr<AutoThreadTaskRunner> caller_task_runner,
scoped_refptr<AutoThreadTaskRunner> io_task_runner,
const base::Closure& stopped_callback) {
- scoped_ptr<DaemonProcessWin> daemon_process(
- new DaemonProcessWin(caller_task_runner, io_task_runner,
- stopped_callback));
+ std::unique_ptr<DaemonProcessWin> daemon_process(new DaemonProcessWin(
+ caller_task_runner, io_task_runner, stopped_callback));
daemon_process->Initialize();
return std::move(daemon_process);
}
« no previous file with comments | « remoting/host/daemon_process_unittest.cc ('k') | remoting/host/desktop_capturer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698