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

Side by Side Diff: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_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_low_energy/bluetooth_low_energy_api.h " 5 #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h "
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 #include <utility> 10 #include <utility>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 return delegate->IsAutoLaunchedKioskApp(id); 333 return delegate->IsAutoLaunchedKioskApp(id);
334 } 334 }
335 335
336 bool IsPeripheralFlagEnabled() { 336 bool IsPeripheralFlagEnabled() {
337 return base::CommandLine::ForCurrentProcess()->HasSwitch( 337 return base::CommandLine::ForCurrentProcess()->HasSwitch(
338 switches::kEnableBLEAdvertising); 338 switches::kEnableBLEAdvertising);
339 } 339 }
340 340
341 } // namespace 341 } // namespace
342 342
343 static base::LazyInstance<BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>> 343 static base::LazyInstance<
344 BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>>::DestructorAtExit
344 g_factory = LAZY_INSTANCE_INITIALIZER; 345 g_factory = LAZY_INSTANCE_INITIALIZER;
345 346
346 // static 347 // static
347 BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>* 348 BrowserContextKeyedAPIFactory<BluetoothLowEnergyAPI>*
348 BluetoothLowEnergyAPI::GetFactoryInstance() { 349 BluetoothLowEnergyAPI::GetFactoryInstance() {
349 return g_factory.Pointer(); 350 return g_factory.Pointer();
350 } 351 }
351 352
352 // static 353 // static
353 BluetoothLowEnergyAPI* BluetoothLowEnergyAPI::Get(BrowserContext* context) { 354 BluetoothLowEnergyAPI* BluetoothLowEnergyAPI::Get(BrowserContext* context) {
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 params_->response.value->end()); 1511 params_->response.value->end());
1511 } 1512 }
1512 event_router_->HandleRequestResponse( 1513 event_router_->HandleRequestResponse(
1513 extension(), params_->response.request_id, params_->response.is_error, 1514 extension(), params_->response.request_id, params_->response.is_error,
1514 uint8_vector); 1515 uint8_vector);
1515 Respond(NoArguments()); 1516 Respond(NoArguments());
1516 } 1517 }
1517 1518
1518 } // namespace api 1519 } // namespace api
1519 } // namespace extensions 1520 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698