diff options
author | rkc <rkc@chromium.org> | 2015-11-04 17:55:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-05 01:56:30 +0000 |
commit | 06c92c041f3b7b62bcddec714fb886b431865057 (patch) | |
tree | 1745f16086c453e1671e6b02df73626cded2f295 /chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc | |
parent | a9ed17edd6831510d2d50680824740a485ae25d6 (diff) | |
download | chromium_src-06c92c041f3b7b62bcddec714fb886b431865057.zip chromium_src-06c92c041f3b7b62bcddec714fb886b431865057.tar.gz chromium_src-06c92c041f3b7b62bcddec714fb886b431865057.tar.bz2 |
Reland: Refactor DBusThreadManager to split away BT clients.
This is a reland of
This CL doesn't change any of the code except for merge and lint changes.
The original CL was triggering a test crash in Valgrind. On this patch,
I've run Valgrind multiple times locally and also additionally run TSan.
Since I am seeing no failures, after talking to glider@ (who works on
Valgrind), I'm attempting to re-land this CL.
TBR=armansito@chromium.org, glider@chromium.org, isherman@chromium.org, oshima@chromium.org, sky@chromium.org, stevenjb@chromium.org
BUG=None.
Committed: c56b94daaf6513891e7da3094ab5054ffbd6262
Cr-Commit-Position: refs/heads/master@{#357707}
Review URL: https://codereview.chromium.org/1411793010
Cr-Commit-Position: refs/heads/master@{#357976}
Diffstat (limited to 'chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc')
-rw-r--r-- | chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc b/chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc deleted file mode 100644 index ce46e3d..0000000 --- a/chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromeos/dbus/dbus_thread_manager.h" -#include "chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.h" -#include "chromeos/dbus/fake_bluetooth_le_advertising_manager_client.h" - -namespace chromeos { - -FakeBluetoothLEAdvertisementServiceProvider:: - FakeBluetoothLEAdvertisementServiceProvider( - const dbus::ObjectPath& object_path, - Delegate* delegate) - : delegate_(delegate) { - object_path_ = object_path; - VLOG(1) << "Creating Bluetooth Advertisement: " << object_path_.value(); - - FakeBluetoothLEAdvertisingManagerClient* - fake_bluetooth_profile_manager_client = - static_cast<FakeBluetoothLEAdvertisingManagerClient*>( - DBusThreadManager::Get() - ->GetBluetoothLEAdvertisingManagerClient()); - fake_bluetooth_profile_manager_client->RegisterAdvertisementServiceProvider( - this); -} - -FakeBluetoothLEAdvertisementServiceProvider:: - ~FakeBluetoothLEAdvertisementServiceProvider() { - VLOG(1) << "Cleaning up Bluetooth Advertisement: " << object_path_.value(); - - FakeBluetoothLEAdvertisingManagerClient* - fake_bluetooth_profile_manager_client = - static_cast<FakeBluetoothLEAdvertisingManagerClient*>( - DBusThreadManager::Get() - ->GetBluetoothLEAdvertisingManagerClient()); - fake_bluetooth_profile_manager_client->UnregisterAdvertisementServiceProvider( - this); -} - -void FakeBluetoothLEAdvertisementServiceProvider::Release() { - VLOG(1) << object_path_.value() << ": Release"; - delegate_->Released(); -} - -} // namespace chromeos |