Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / bluetooth_low_energy / bluetooth_api_advertisement.cc
blobc1a924804df92750937d456eb483caf3511214bb
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.h"
7 #include "base/lazy_instance.h"
8 #include "device/bluetooth/bluetooth_advertisement.h"
9 #include "net/base/io_buffer.h"
11 namespace extensions {
13 // static
14 static base::LazyInstance<BrowserContextKeyedAPIFactory<
15 ApiResourceManager<BluetoothApiAdvertisement>>> g_server_factory =
16 LAZY_INSTANCE_INITIALIZER;
18 // static
19 template <>
20 BrowserContextKeyedAPIFactory<ApiResourceManager<BluetoothApiAdvertisement>>*
21 ApiResourceManager<BluetoothApiAdvertisement>::GetFactoryInstance() {
22 return g_server_factory.Pointer();
25 BluetoothApiAdvertisement::BluetoothApiAdvertisement(
26 const std::string& owner_extension_id,
27 scoped_refptr<device::BluetoothAdvertisement> advertisement)
28 : ApiResource(owner_extension_id), advertisement_(advertisement) {
29 DCHECK(content::BrowserThread::CurrentlyOn(kThreadId));
32 BluetoothApiAdvertisement::~BluetoothApiAdvertisement() {
35 } // namespace extensions