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

Unified Diff: extensions/browser/api/hid/hid_device_manager.h

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr 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 | « extensions/browser/api/hid/hid_apitest.cc ('k') | extensions/browser/api/hid/hid_device_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_device_manager.h
diff --git a/extensions/browser/api/hid/hid_device_manager.h b/extensions/browser/api/hid/hid_device_manager.h
index 0e57e6f68f1bb0eb582ab83e9d9eb99ca249d54f..f75e59a0b0ad41e3f5279dc664027c33677ef0f8 100644
--- a/extensions/browser/api/hid/hid_device_manager.h
+++ b/extensions/browser/api/hid/hid_device_manager.h
@@ -6,11 +6,11 @@
#define EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_
#include <map>
+#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/scoped_observer.h"
#include "base/threading/thread_checker.h"
#include "device/hid/hid_service.h"
@@ -34,7 +34,7 @@ class HidDeviceManager : public BrowserContextKeyedAPI,
public device::HidService::Observer,
public EventRouter::Observer {
public:
- typedef base::Callback<void(scoped_ptr<base::ListValue>)>
+ typedef base::Callback<void(std::unique_ptr<base::ListValue>)>
GetApiDevicesCallback;
explicit HidDeviceManager(content::BrowserContext* context);
@@ -58,7 +58,7 @@ class HidDeviceManager : public BrowserContextKeyedAPI,
// Converts a list of HidDeviceInfo objects into a value that can be returned
// through the API.
- scoped_ptr<base::ListValue> GetApiDevicesFromList(
+ std::unique_ptr<base::ListValue> GetApiDevicesFromList(
const std::vector<scoped_refptr<device::HidDeviceInfo>>& devices);
scoped_refptr<device::HidDeviceInfo> GetDeviceInfo(int resource_id);
@@ -101,7 +101,7 @@ class HidDeviceManager : public BrowserContextKeyedAPI,
// Builds a list of device info objects representing the currently enumerated
// devices, taking into account the permissions held by the given extension
// and the filters provided.
- scoped_ptr<base::ListValue> CreateApiDeviceList(
+ std::unique_ptr<base::ListValue> CreateApiDeviceList(
const Extension* extension,
const std::vector<device::HidDeviceFilter>& filters);
void OnEnumerationComplete(
@@ -109,7 +109,7 @@ class HidDeviceManager : public BrowserContextKeyedAPI,
void DispatchEvent(events::HistogramValue histogram_value,
const std::string& event_name,
- scoped_ptr<base::ListValue> event_args,
+ std::unique_ptr<base::ListValue> event_args,
scoped_refptr<device::HidDeviceInfo> device_info);
base::ThreadChecker thread_checker_;
@@ -119,7 +119,7 @@ class HidDeviceManager : public BrowserContextKeyedAPI,
ScopedObserver<device::HidService, device::HidService::Observer>
hid_service_observer_;
bool enumeration_ready_ = false;
- std::vector<scoped_ptr<GetApiDevicesParams>> pending_enumerations_;
+ std::vector<std::unique_ptr<GetApiDevicesParams>> pending_enumerations_;
int next_resource_id_ = 0;
ResourceIdToDeviceIdMap device_ids_;
DeviceIdToResourceIdMap resource_ids_;
« no previous file with comments | « extensions/browser/api/hid/hid_apitest.cc ('k') | extensions/browser/api/hid/hid_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698