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

Side by Side Diff: extensions/browser/api/bluetooth/bluetooth_private_api.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 #include "extensions/browser/api/bluetooth/bluetooth_private_api.h" 5 #include "extensions/browser/api/bluetooth/bluetooth_private_api.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "device/bluetooth/bluetooth_adapter.h" 14 #include "device/bluetooth/bluetooth_adapter.h"
15 #include "device/bluetooth/bluetooth_adapter_factory.h" 15 #include "device/bluetooth/bluetooth_adapter_factory.h"
16 #include "device/bluetooth/bluetooth_common.h" 16 #include "device/bluetooth/bluetooth_common.h"
17 #include "device/bluetooth/bluetooth_discovery_session.h" 17 #include "device/bluetooth/bluetooth_discovery_session.h"
18 #include "extensions/browser/api/bluetooth/bluetooth_api.h" 18 #include "extensions/browser/api/bluetooth/bluetooth_api.h"
19 #include "extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.h" 19 #include "extensions/browser/api/bluetooth/bluetooth_api_pairing_delegate.h"
20 #include "extensions/browser/api/bluetooth/bluetooth_event_router.h" 20 #include "extensions/browser/api/bluetooth/bluetooth_event_router.h"
21 #include "extensions/common/api/bluetooth_private.h" 21 #include "extensions/common/api/bluetooth_private.h"
22 22
23 namespace bt_private = extensions::api::bluetooth_private; 23 namespace bt_private = extensions::api::bluetooth_private;
24 namespace SetDiscoveryFilter = bt_private::SetDiscoveryFilter; 24 namespace SetDiscoveryFilter = bt_private::SetDiscoveryFilter;
25 25
26 namespace extensions { 26 namespace extensions {
27 27
28 static base::LazyInstance<BrowserContextKeyedAPIFactory<BluetoothPrivateAPI>> 28 static base::LazyInstance<BrowserContextKeyedAPIFactory<BluetoothPrivateAPI>>::
29 g_factory = LAZY_INSTANCE_INITIALIZER; 29 DestructorAtExit g_factory = LAZY_INSTANCE_INITIALIZER;
30 30
31 namespace { 31 namespace {
32 32
33 std::string GetListenerId(const EventListenerInfo& details) { 33 std::string GetListenerId(const EventListenerInfo& details) {
34 return !details.extension_id.empty() ? details.extension_id 34 return !details.extension_id.empty() ? details.extension_id
35 : details.listener_url.host(); 35 : details.listener_url.host();
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 device::BluetoothDevice::ConnectErrorCode error) { 617 device::BluetoothDevice::ConnectErrorCode error) {
618 SetError(kPairingFailed); 618 SetError(kPairingFailed);
619 SendResponse(false); 619 SendResponse(false);
620 } 620 }
621 621
622 //////////////////////////////////////////////////////////////////////////////// 622 ////////////////////////////////////////////////////////////////////////////////
623 623
624 } // namespace api 624 } // namespace api
625 625
626 } // namespace extensions 626 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698