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

Unified Diff: device/usb/usb_service_impl.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/usb/usb_service.cc ('k') | device/usb/usb_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service_impl.cc
diff --git a/device/usb/usb_service_impl.cc b/device/usb/usb_service_impl.cc
index c16aee3c465a07a4ed567d852fc46f4cf8872c20..2624991c9401dd051eb0e20ca4eee5fb0890db67 100644
--- a/device/usb/usb_service_impl.cc
+++ b/device/usb/usb_service_impl.cc
@@ -5,7 +5,9 @@
#include "device/usb/usb_service_impl.h"
#include <stdint.h>
+
#include <list>
+#include <memory>
#include <set>
#include <utility>
@@ -124,7 +126,7 @@ void SaveStringsAndRunContinuation(
uint8_t product,
uint8_t serial_number,
const base::Closure& continuation,
- scoped_ptr<std::map<uint8_t, base::string16>> string_map) {
+ std::unique_ptr<std::map<uint8_t, base::string16>> string_map) {
if (manufacturer != 0)
device->set_manufacturer_string((*string_map)[manufacturer]);
if (product != 0)
@@ -136,7 +138,7 @@ void SaveStringsAndRunContinuation(
void OnReadBosDescriptor(scoped_refptr<UsbDeviceHandle> device_handle,
const base::Closure& barrier,
- scoped_ptr<WebUsbAllowedOrigins> allowed_origins,
+ std::unique_ptr<WebUsbAllowedOrigins> allowed_origins,
const GURL& landing_page) {
scoped_refptr<UsbDeviceImpl> device =
static_cast<UsbDeviceImpl*>(device_handle->GetDevice().get());
@@ -158,7 +160,7 @@ void OnDeviceOpenedReadDescriptors(
const base::Closure& failure_closure,
scoped_refptr<UsbDeviceHandle> device_handle) {
if (device_handle) {
- scoped_ptr<std::map<uint8_t, base::string16>> string_map(
+ std::unique_ptr<std::map<uint8_t, base::string16>> string_map(
new std::map<uint8_t, base::string16>());
if (manufacturer != 0)
(*string_map)[manufacturer] = base::string16();
« no previous file with comments | « device/usb/usb_service.cc ('k') | device/usb/usb_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698