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

Unified Diff: chromeos/dbus/fake_bluetooth_profile_service_provider.cc

Issue 14487002: Bluetooth: Profile support for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit tests, and class comments Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/fake_bluetooth_profile_service_provider.cc
diff --git a/chromeos/dbus/fake_bluetooth_profile_service_provider.cc b/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
index 999da6f8befdaa051d2b7a0f3f35e096de8e51a6..a0214645e6e7fa577b29a94c5c239da40a47b892 100644
--- a/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
+++ b/chromeos/dbus/fake_bluetooth_profile_service_provider.cc
@@ -4,6 +4,8 @@
#include "chromeos/dbus/fake_bluetooth_profile_service_provider.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/fake_bluetooth_profile_manager_client.h"
#include "dbus/object_path.h"
namespace chromeos {
@@ -14,10 +16,22 @@ FakeBluetoothProfileServiceProvider::FakeBluetoothProfileServiceProvider(
: object_path_(object_path),
delegate_(delegate) {
VLOG(1) << "Creating Bluetooth Profile: " << object_path_.value();
+
+ FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client =
+ static_cast<FakeBluetoothProfileManagerClient*>(
+ DBusThreadManager::Get()->
+ GetExperimentalBluetoothProfileManagerClient());
+ fake_bluetooth_profile_manager_client->RegisterProfileServiceProvider(this);
}
FakeBluetoothProfileServiceProvider::~FakeBluetoothProfileServiceProvider() {
VLOG(1) << "Cleaning up Bluetooth Profile: " << object_path_.value();
+
+ FakeBluetoothProfileManagerClient* fake_bluetooth_profile_manager_client =
+ static_cast<FakeBluetoothProfileManagerClient*>(
+ DBusThreadManager::Get()->
+ GetExperimentalBluetoothProfileManagerClient());
+ fake_bluetooth_profile_manager_client->UnregisterProfileServiceProvider(this);
}
void FakeBluetoothProfileServiceProvider::Release() {
@@ -27,12 +41,12 @@ void FakeBluetoothProfileServiceProvider::Release() {
void FakeBluetoothProfileServiceProvider::NewConnection(
const dbus::ObjectPath& device_path,
- dbus::FileDescriptor* fd,
+ scoped_ptr<dbus::FileDescriptor> fd,
const Delegate::Options& options,
const Delegate::ConfirmationCallback& callback) {
VLOG(1) << object_path_.value() << ": NewConnection for "
<< device_path.value();
- delegate_->NewConnection(device_path, fd, options, callback);
+ delegate_->NewConnection(device_path, fd.Pass(), options, callback);
}
void FakeBluetoothProfileServiceProvider::RequestDisconnection(
« no previous file with comments | « chromeos/dbus/fake_bluetooth_profile_service_provider.h ('k') | device/bluetooth/bluetooth_adapter_experimental_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698