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

Unified Diff: chromeos/dbus/fake_bluetooth_profile_manager_client.cc

Issue 982593002: Fix BluetoothAdapterProfileChromeOS lifecycle management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits, remove test debug logging Created 5 years, 9 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_manager_client.cc
diff --git a/chromeos/dbus/fake_bluetooth_profile_manager_client.cc b/chromeos/dbus/fake_bluetooth_profile_manager_client.cc
index 9f24a86a15767c5dd8a5777d06fd286f61809ae8..e8726ea783b8cfa51e8f33f398f13e03737f65a0 100644
--- a/chromeos/dbus/fake_bluetooth_profile_manager_client.cc
+++ b/chromeos/dbus/fake_bluetooth_profile_manager_client.cc
@@ -19,6 +19,8 @@ const char FakeBluetoothProfileManagerClient::kL2capUuid[] =
"4d995052-33cc-4fdf-b446-75f32942a076";
const char FakeBluetoothProfileManagerClient::kRfcommUuid[] =
"3f6d6dbf-a6ad-45fc-9653-47dc912ef70e";
+const char FakeBluetoothProfileManagerClient::kUnregisterableUuid[] =
+ "00000000-0000-0000-0000-000000000000";
FakeBluetoothProfileManagerClient::FakeBluetoothProfileManagerClient() {
}
@@ -37,6 +39,14 @@ void FakeBluetoothProfileManagerClient::RegisterProfile(
const ErrorCallback& error_callback) {
VLOG(1) << "RegisterProfile: " << profile_path.value() << ": " << uuid;
+ if (uuid == kUnregisterableUuid) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(error_callback,
+ bluetooth_profile_manager::kErrorInvalidArguments,
+ "Can't register this UUID"));
+ return;
+ }
+
// check options for channel & psm
ServiceProviderMap::iterator iter = service_provider_map_.find(profile_path);
« no previous file with comments | « chromeos/dbus/fake_bluetooth_profile_manager_client.h ('k') | device/bluetooth/bluetooth_adapter_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698