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

Side by Side Diff: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_notify_session.cc

Issue 587453005: Cleanup: Remove some std::map::operator[] usage in ApiResourceManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_notif y_session.h" 5 #include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_notif y_session.h"
6 6
7 #include "base/lazy_instance.h"
8
7 namespace extensions { 9 namespace extensions {
8 10
9 static base::LazyInstance<BrowserContextKeyedAPIFactory< 11 static base::LazyInstance<BrowserContextKeyedAPIFactory<
10 ApiResourceManager<BluetoothLowEnergyNotifySession> > > g_factory = 12 ApiResourceManager<BluetoothLowEnergyNotifySession> > > g_factory =
11 LAZY_INSTANCE_INITIALIZER; 13 LAZY_INSTANCE_INITIALIZER;
12 14
13 template <> 15 template <>
14 BrowserContextKeyedAPIFactory< 16 BrowserContextKeyedAPIFactory<
15 ApiResourceManager<BluetoothLowEnergyNotifySession> >* 17 ApiResourceManager<BluetoothLowEnergyNotifySession> >*
16 ApiResourceManager<BluetoothLowEnergyNotifySession>::GetFactoryInstance() { 18 ApiResourceManager<BluetoothLowEnergyNotifySession>::GetFactoryInstance() {
(...skipping 15 matching lines...) Expand all
32 device::BluetoothGattNotifySession* 34 device::BluetoothGattNotifySession*
33 BluetoothLowEnergyNotifySession::GetSession() const { 35 BluetoothLowEnergyNotifySession::GetSession() const {
34 return session_.get(); 36 return session_.get();
35 } 37 }
36 38
37 bool BluetoothLowEnergyNotifySession::IsPersistent() const { 39 bool BluetoothLowEnergyNotifySession::IsPersistent() const {
38 return persistent_; 40 return persistent_;
39 } 41 }
40 42
41 } // namespace extensions 43 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698