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

Unified Diff: device/bluetooth/bluetooth_adapter_bluez.cc

Issue 1810993002: Don't improve Bluetooth Adapter name on Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluetooth_adapter_bluez.cc b/device/bluetooth/bluetooth_adapter_bluez.cc
index 91345fcaa8534237b000e057c5016e39033443e0..ff676eaa2ddb21d5ad809deb6dd17f101e5e6be4 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluetooth_adapter_bluez.cc
@@ -824,7 +824,9 @@ void BluetoothAdapterBlueZ::SetAdapter(const dbus::ObjectPath& object_path) {
base::Bind(&BluetoothAdapterBlueZ::OnRegisterAgentError,
weak_ptr_factory_.GetWeakPtr()));
- SetDefaultAdapterName();
+#if defined(OS_CHROMEOS)
+ SetStandardChromeOSAdapterName();
+#endif
bluez::BluetoothAdapterClient::Properties* properties =
bluez::BluezDBusManager::Get()
@@ -851,11 +853,11 @@ void BluetoothAdapterBlueZ::SetAdapter(const dbus::ObjectPath& object_path) {
}
}
-void BluetoothAdapterBlueZ::SetDefaultAdapterName() {
+#if defined(OS_CHROMEOS)
+void BluetoothAdapterBlueZ::SetStandardChromeOSAdapterName() {
DCHECK(IsPresent());
std::string alias;
-#if defined(OS_CHROMEOS)
switch (chromeos::GetDeviceType()) {
case chromeos::DeviceType::kChromebase:
alias = "Chromebase";
@@ -873,10 +875,6 @@ void BluetoothAdapterBlueZ::SetDefaultAdapterName() {
alias = "Chromebook";
break;
}
-#elif defined(OS_LINUX)
- alias = "ChromeLinux";
-#endif
-
// Take the lower 2 bytes of hashed Bluetooth address and combine it with the
// device type to create a more identifiable device name.
const std::string address = GetAddress();
@@ -885,6 +883,7 @@ void BluetoothAdapterBlueZ::SetDefaultAdapterName() {
base::SuperFastHash(address.data(), address.size()) & 0xFFFF);
SetName(alias, base::Bind(&base::DoNothing), base::Bind(&base::DoNothing));
}
+#endif
void BluetoothAdapterBlueZ::RemoveAdapter() {
DCHECK(IsPresent());
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698