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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_api.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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 CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_ API_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_event_router.h" 11 #include "chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energ y_event_router.h"
11 #include "chrome/browser/extensions/browser_context_keyed_service_factories.h" 12 #include "chrome/browser/extensions/browser_context_keyed_service_factories.h"
12 #include "device/bluetooth/bluetooth_advertisement.h" 13 #include "device/bluetooth/bluetooth_advertisement.h"
13 #include "extensions/browser/api/api_resource_manager.h" 14 #include "extensions/browser/api/api_resource_manager.h"
14 #include "extensions/browser/extension_function.h" 15 #include "extensions/browser/extension_function.h"
15 #include "extensions/browser/extension_function_histogram_value.h" 16 #include "extensions/browser/extension_function_histogram_value.h"
16 17
17 namespace extensions { 18 namespace extensions {
18 19
19 class BluetoothApiAdvertisement; 20 class BluetoothApiAdvertisement;
(...skipping 19 matching lines...) Expand all
39 } 40 }
40 41
41 // BrowserContextKeyedAPI implementation. 42 // BrowserContextKeyedAPI implementation.
42 static const char* service_name() { return "BluetoothLowEnergyAPI"; } 43 static const char* service_name() { return "BluetoothLowEnergyAPI"; }
43 static const bool kServiceRedirectedInIncognito = true; 44 static const bool kServiceRedirectedInIncognito = true;
44 static const bool kServiceIsNULLWhileTesting = true; 45 static const bool kServiceIsNULLWhileTesting = true;
45 46
46 private: 47 private:
47 friend class BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>; 48 friend class BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>;
48 49
49 scoped_ptr<BluetoothLowEnergyEventRouter> event_router_; 50 std::unique_ptr<BluetoothLowEnergyEventRouter> event_router_;
50 51
51 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAPI); 52 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyAPI);
52 }; 53 };
53 54
54 namespace api { 55 namespace api {
55 56
56 // Base class for bluetoothLowEnergy API functions. This class handles some of 57 // Base class for bluetoothLowEnergy API functions. This class handles some of
57 // the common logic involved in all API functions, such as checking for 58 // the common logic involved in all API functions, such as checking for
58 // platform support and returning the correct error. 59 // platform support and returning the correct error.
59 class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction { 60 class BluetoothLowEnergyExtensionFunction : public AsyncExtensionFunction {
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 device::BluetoothAdvertisement::ErrorCode status); 396 device::BluetoothAdvertisement::ErrorCode status);
396 397
397 // The instance ID of the requested descriptor. 398 // The instance ID of the requested descriptor.
398 std::string instance_id_; 399 std::string instance_id_;
399 }; 400 };
400 401
401 } // namespace api 402 } // namespace api
402 } // namespace extensions 403 } // namespace extensions
403 404
404 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_ 405 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENER GY_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698