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

Side by Side Diff: device/usb/usb_device_impl.h

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 unified diff | Download patch
« no previous file with comments | « device/usb/usb_device_handle_unittest.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ 5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_
6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ 6 #define DEVICE_USB_USB_DEVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
11 #include <memory>
11 #include <string> 12 #include <string>
12 #include <utility> 13 #include <utility>
13 14
14 #include "base/callback.h" 15 #include "base/callback.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/threading/thread_checker.h" 17 #include "base/threading/thread_checker.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 #include "device/usb/usb_descriptors.h" 19 #include "device/usb/usb_descriptors.h"
19 #include "device/usb/usb_device.h" 20 #include "device/usb/usb_device.h"
20 #include "device/usb/webusb_descriptors.h" 21 #include "device/usb/webusb_descriptors.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 manufacturer_string_ = value; 57 manufacturer_string_ = value;
57 } 58 }
58 void set_product_string(const base::string16& value) { 59 void set_product_string(const base::string16& value) {
59 product_string_ = value; 60 product_string_ = value;
60 } 61 }
61 void set_serial_number(const base::string16& value) { 62 void set_serial_number(const base::string16& value) {
62 serial_number_ = value; 63 serial_number_ = value;
63 } 64 }
64 void set_device_path(const std::string& value) { device_path_ = value; } 65 void set_device_path(const std::string& value) { device_path_ = value; }
65 void set_webusb_allowed_origins( 66 void set_webusb_allowed_origins(
66 scoped_ptr<WebUsbAllowedOrigins> allowed_origins) { 67 std::unique_ptr<WebUsbAllowedOrigins> allowed_origins) {
67 webusb_allowed_origins_ = std::move(allowed_origins); 68 webusb_allowed_origins_ = std::move(allowed_origins);
68 } 69 }
69 void set_webusb_landing_page(const GURL& url) { webusb_landing_page_ = url; } 70 void set_webusb_landing_page(const GURL& url) { webusb_landing_page_ = url; }
70 71
71 PlatformUsbDevice platform_device() const { return platform_device_; } 72 PlatformUsbDevice platform_device() const { return platform_device_; }
72 73
73 protected: 74 protected:
74 friend class UsbServiceImpl; 75 friend class UsbServiceImpl;
75 friend class UsbDeviceHandleImpl; 76 friend class UsbDeviceHandleImpl;
76 77
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 129
129 scoped_refptr<base::SequencedTaskRunner> task_runner_; 130 scoped_refptr<base::SequencedTaskRunner> task_runner_;
130 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 131 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); 133 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl);
133 }; 134 };
134 135
135 } // namespace device 136 } // namespace device
136 137
137 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ 138 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « device/usb/usb_device_handle_unittest.cc ('k') | device/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698