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

Unified Diff: device/hid/hid_connection_linux.cc

Issue 1874313002: Convert device to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 | « device/hid/device_monitor_linux.cc ('k') | device/hid/hid_connection_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection_linux.cc
diff --git a/device/hid/hid_connection_linux.cc b/device/hid/hid_connection_linux.cc
index 05fda64baad944e35aa963742a3795ea96e53ee9..8f93adc4ee0f87a9cb66e3b99ddf07d366821c1f 100644
--- a/device/hid/hid_connection_linux.cc
+++ b/device/hid/hid_connection_linux.cc
@@ -7,6 +7,8 @@
#include <errno.h>
#include <linux/hidraw.h>
#include <sys/ioctl.h>
+
+#include <memory>
#include <string>
#include <utility>
@@ -54,7 +56,7 @@ class HidConnectionLinux::FileThreadHelper
// Starts the FileDescriptorWatcher that reads input events from the device.
// Must be called on a thread that has a base::MessageLoopForIO.
- static void Start(scoped_ptr<FileThreadHelper> self) {
+ static void Start(std::unique_ptr<FileThreadHelper> self) {
base::ThreadRestrictions::AssertIOAllowed();
self->thread_checker_.DetachFromThread();
@@ -140,7 +142,7 @@ HidConnectionLinux::HidConnectionLinux(
// The helper is passed a weak pointer to this connection so that it can be
// cleaned up after the connection is closed.
- scoped_ptr<FileThreadHelper> helper(
+ std::unique_ptr<FileThreadHelper> helper(
new FileThreadHelper(device_file_.GetPlatformFile(), device_info,
weak_factory_.GetWeakPtr(), task_runner_));
helper_ = helper.get();
« no previous file with comments | « device/hid/device_monitor_linux.cc ('k') | device/hid/hid_connection_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698