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

Side by Side Diff: extensions/browser/api/device_permissions_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 unified diff | Download patch
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 EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_ 5 #ifndef EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_
6 #define EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_ 6 #define EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <set> 12 #include <set>
12 #include <vector> 13 #include <vector>
13 14
14 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
18 #include "base/scoped_observer.h" 18 #include "base/scoped_observer.h"
19 #include "base/strings/string16.h" 19 #include "base/strings/string16.h"
20 #include "base/threading/thread_checker.h" 20 #include "base/threading/thread_checker.h"
21 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 21 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
22 #include "components/keyed_service/core/keyed_service.h" 22 #include "components/keyed_service/core/keyed_service.h"
23 #include "device/hid/hid_service.h" 23 #include "device/hid/hid_service.h"
24 #include "device/usb/usb_service.h" 24 #include "device/usb/usb_service.h"
25 25
26 namespace base { 26 namespace base {
27 template <typename T> 27 template <typename T>
(...skipping 25 matching lines...) Expand all
53 const base::string16& product_string, 53 const base::string16& product_string,
54 const base::Time& last_used); 54 const base::Time& last_used);
55 55
56 // A persistent device is one that can be recognized when it is reconnected 56 // A persistent device is one that can be recognized when it is reconnected
57 // and can therefore be remembered persistently by writing information about 57 // and can therefore be remembered persistently by writing information about
58 // it to ExtensionPrefs. Currently this means it has a serial number string. 58 // it to ExtensionPrefs. Currently this means it has a serial number string.
59 bool IsPersistent() const; 59 bool IsPersistent() const;
60 60
61 // Convert the device to a serializable value, returns a null pointer if the 61 // Convert the device to a serializable value, returns a null pointer if the
62 // entry is not persistent. 62 // entry is not persistent.
63 scoped_ptr<base::Value> ToValue() const; 63 std::unique_ptr<base::Value> ToValue() const;
64 64
65 base::string16 GetPermissionMessageString() const; 65 base::string16 GetPermissionMessageString() const;
66 66
67 Type type() const { return type_; } 67 Type type() const { return type_; }
68 uint16_t vendor_id() const { return vendor_id_; } 68 uint16_t vendor_id() const { return vendor_id_; }
69 uint16_t product_id() const { return product_id_; } 69 uint16_t product_id() const { return product_id_; }
70 const base::string16& serial_number() const { return serial_number_; } 70 const base::string16& serial_number() const { return serial_number_; }
71 const base::Time& last_used() const { return last_used_; } 71 const base::Time& last_used() const { return last_used_; }
72 72
73 base::string16 GetManufacturer() const; 73 base::string16 GetManufacturer() const;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 content::BrowserContext* context) const override; 221 content::BrowserContext* context) const override;
222 content::BrowserContext* GetBrowserContextToUse( 222 content::BrowserContext* GetBrowserContextToUse(
223 content::BrowserContext* context) const override; 223 content::BrowserContext* context) const override;
224 224
225 DISALLOW_COPY_AND_ASSIGN(DevicePermissionsManagerFactory); 225 DISALLOW_COPY_AND_ASSIGN(DevicePermissionsManagerFactory);
226 }; 226 };
227 227
228 } // namespace extensions 228 } // namespace extensions
229 229
230 #endif // EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_ 230 #endif // EXTENSIONS_DEVICE_PERMISSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698