Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chromeos / dbus / fake_bluetooth_gatt_service_service_provider.cc
blobd06abd3b0adcdeb99ccd2656fb91727cc9b02763
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
3 // found in the LICENSE file.
5 #include "chromeos/dbus/fake_bluetooth_gatt_service_service_provider.h"
7 #include "base/logging.h"
8 #include "chromeos/dbus/dbus_thread_manager.h"
9 #include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h"
11 namespace chromeos {
13 FakeBluetoothGattServiceServiceProvider::
14 FakeBluetoothGattServiceServiceProvider(
15 const dbus::ObjectPath& object_path,
16 const std::string& uuid,
17 const std::vector<dbus::ObjectPath>& includes)
18 : object_path_(object_path),
19 uuid_(uuid),
20 includes_(includes) {
21 VLOG(1) << "Creating Bluetooth GATT service: " << object_path_.value();
23 FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
24 static_cast<FakeBluetoothGattManagerClient*>(
25 DBusThreadManager::Get()->GetBluetoothGattManagerClient());
26 fake_bluetooth_gatt_manager_client->RegisterServiceServiceProvider(this);
29 FakeBluetoothGattServiceServiceProvider::
30 ~FakeBluetoothGattServiceServiceProvider() {
31 VLOG(1) << "Cleaning up Bluetooth GATT service: " << object_path_.value();
33 FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
34 static_cast<FakeBluetoothGattManagerClient*>(
35 DBusThreadManager::Get()->GetBluetoothGattManagerClient());
36 fake_bluetooth_gatt_manager_client->UnregisterServiceServiceProvider(this);
39 } // namespace chromeos