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

Side by Side Diff: extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.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_socket/bluetooth_socket_event_dispatc her.h" 5 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatc her.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "device/bluetooth/bluetooth_device.h" 10 #include "device/bluetooth/bluetooth_device.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
58 namespace extensions { 58 namespace extensions {
59 namespace api { 59 namespace api {
60 60
61 using content::BrowserThread; 61 using content::BrowserThread;
62 62
63 static base::LazyInstance< 63 static base::LazyInstance<BrowserContextKeyedAPIFactory<
64 BrowserContextKeyedAPIFactory<BluetoothSocketEventDispatcher> > g_factory = 64 BluetoothSocketEventDispatcher>>::DestructorAtExit g_factory =
65 LAZY_INSTANCE_INITIALIZER; 65 LAZY_INSTANCE_INITIALIZER;
66 66
67 // static 67 // static
68 BrowserContextKeyedAPIFactory<BluetoothSocketEventDispatcher>* 68 BrowserContextKeyedAPIFactory<BluetoothSocketEventDispatcher>*
69 BluetoothSocketEventDispatcher::GetFactoryInstance() { 69 BluetoothSocketEventDispatcher::GetFactoryInstance() {
70 return g_factory.Pointer(); 70 return g_factory.Pointer();
71 } 71 }
72 72
73 // static 73 // static
74 BluetoothSocketEventDispatcher* BluetoothSocketEventDispatcher::Get( 74 BluetoothSocketEventDispatcher* BluetoothSocketEventDispatcher::Get(
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context)) 368 if (!extensions::ExtensionsBrowserClient::Get()->IsValidContext(context))
369 return; 369 return;
370 370
371 EventRouter* router = EventRouter::Get(context); 371 EventRouter* router = EventRouter::Get(context);
372 if (router) 372 if (router)
373 router->DispatchEventToExtension(extension_id, std::move(event)); 373 router->DispatchEventToExtension(extension_id, std::move(event));
374 } 374 }
375 375
376 } // namespace api 376 } // namespace api
377 } // namespace extensions 377 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698