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

Unified Diff: device/core/device_monitor_win.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/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h ('k') | device/core/mock_device_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/core/device_monitor_win.cc
diff --git a/device/core/device_monitor_win.cc b/device/core/device_monitor_win.cc
index 1d099076841b95cb6d9412ee9a4ce9440107c7e2..1801adfa5384ecf2645361284c7ccde37960c38d 100644
--- a/device/core/device_monitor_win.cc
+++ b/device/core/device_monitor_win.cc
@@ -4,14 +4,15 @@
#include "device/core/device_monitor_win.h"
-#include <windows.h>
#include <dbt.h>
+#include <windows.h>
+
#include <map>
+#include <memory>
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/win/message_window.h"
@@ -55,7 +56,7 @@ class DeviceMonitorMessageWindow {
}
DeviceMonitorWin* GetForDeviceInterface(const GUID& device_interface) {
- scoped_ptr<DeviceMonitorWin>& device_monitor =
+ std::unique_ptr<DeviceMonitorWin>& device_monitor =
device_monitors_[device_interface];
if (!device_monitor) {
device_monitor.reset(new DeviceMonitorWin());
@@ -138,9 +139,10 @@ class DeviceMonitorMessageWindow {
return false;
}
- std::map<GUID, scoped_ptr<DeviceMonitorWin>, CompareGUID> device_monitors_;
+ std::map<GUID, std::unique_ptr<DeviceMonitorWin>, CompareGUID>
+ device_monitors_;
DeviceMonitorWin all_device_monitor_;
- scoped_ptr<base::win::MessageWindow> window_;
+ std::unique_ptr<base::win::MessageWindow> window_;
HDEVNOTIFY notify_handle_ = NULL;
DISALLOW_COPY_AND_ASSIGN(DeviceMonitorMessageWindow);
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h ('k') | device/core/mock_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698