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); |