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

Unified Diff: remoting/host/daemon_process_unittest.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.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/daemon_process_unittest.cc
diff --git a/remoting/host/daemon_process_unittest.cc b/remoting/host/daemon_process_unittest.cc
index b3ba10c65f5b96edc61c342dddca06d5ce031fe2..5d042adb3f6ba5e3684a525e264398a9d51d9d5a 100644
--- a/remoting/host/daemon_process_unittest.cc
+++ b/remoting/host/daemon_process_unittest.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/host/daemon_process.h"
+
#include <stdint.h>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/process/process.h"
#include "ipc/ipc_message.h"
@@ -15,7 +18,6 @@
#include "ipc/ipc_platform_file.h"
#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/chromoting_messages.h"
-#include "remoting/host/daemon_process.h"
#include "remoting/host/desktop_session.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gmock_mutant.h"
@@ -59,7 +61,7 @@ class MockDaemonProcess : public DaemonProcess {
const base::Closure& stopped_callback);
~MockDaemonProcess() override;
- scoped_ptr<DesktopSession> DoCreateDesktopSession(
+ std::unique_ptr<DesktopSession> DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) override;
@@ -98,11 +100,11 @@ MockDaemonProcess::MockDaemonProcess(
MockDaemonProcess::~MockDaemonProcess() {
}
-scoped_ptr<DesktopSession> MockDaemonProcess::DoCreateDesktopSession(
+std::unique_ptr<DesktopSession> MockDaemonProcess::DoCreateDesktopSession(
int terminal_id,
const ScreenResolution& resolution,
bool virtual_terminal) {
- return make_scoped_ptr(DoCreateDesktopSessionPtr(terminal_id));
+ return base::WrapUnique(DoCreateDesktopSessionPtr(terminal_id));
}
bool MockDaemonProcess::OnMessageReceived(const IPC::Message& message) {
@@ -149,7 +151,7 @@ class DaemonProcessTest : public testing::Test {
protected:
base::MessageLoopForIO message_loop_;
- scoped_ptr<MockDaemonProcess> daemon_process_;
+ std::unique_ptr<MockDaemonProcess> daemon_process_;
int terminal_id_;
};
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698