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

Unified Diff: remoting/host/local_input_monitor_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/local_input_monitor_unittest.cc ('k') | remoting/host/local_input_monitor_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_win.cc
diff --git a/remoting/host/local_input_monitor_win.cc b/remoting/host/local_input_monitor_win.cc
index 11073bee086eadbddc8480634e54ab429659d6f9..ac6525e3851c5398b04b38020311c8d49f32ced2 100644
--- a/remoting/host/local_input_monitor_win.cc
+++ b/remoting/host/local_input_monitor_win.cc
@@ -11,6 +11,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/threading/non_thread_safe.h"
@@ -69,7 +70,7 @@ class LocalInputMonitorWin : public base::NonThreadSafe,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
// Used to receive raw input.
- scoped_ptr<base::win::MessageWindow> window_;
+ std::unique_ptr<base::win::MessageWindow> window_;
// Points to the object receiving mouse event notifications.
base::WeakPtr<ClientSessionControl> client_session_control_;
@@ -174,7 +175,7 @@ LRESULT LocalInputMonitorWin::Core::OnInput(HRAWINPUT input_handle) {
}
// Retrieve the input record itself.
- scoped_ptr<uint8_t[]> buffer(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> buffer(new uint8_t[size]);
RAWINPUT* input = reinterpret_cast<RAWINPUT*>(buffer.get());
result = GetRawInputData(input_handle,
RID_INPUT,
@@ -235,12 +236,12 @@ bool LocalInputMonitorWin::Core::HandleMessage(
} // namespace
-scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create(
+std::unique_ptr<LocalInputMonitor> LocalInputMonitor::Create(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control) {
- return make_scoped_ptr(new LocalInputMonitorWin(
+ return base::WrapUnique(new LocalInputMonitorWin(
caller_task_runner, ui_task_runner, client_session_control));
}
« no previous file with comments | « remoting/host/local_input_monitor_unittest.cc ('k') | remoting/host/local_input_monitor_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698