Commit d6c1d869 authored by isherman's avatar isherman Committed by Commit bot

[Cleanup] Eliminate a bit of console spam.

Stop calling BluetoothAdapter::IsDiscoverable() on non-ChromeOS platforms, as
this method is only implemented on ChromeOS, and the feature code that was
calling it currently only runs on ChromeOS.

BUG=488263
TEST=none
R=tengs@chromium.org

Review URL: https://codereview.chromium.org/1148713002

Cr-Commit-Position: refs/heads/master@{#330867}
parent 1ec1fbb1
......@@ -142,12 +142,6 @@ class EasyUnlockService::BluetoothDetector
adapter_->AddObserver(this);
service_->OnBluetoothAdapterPresentChanged();
// TODO(tengs): At the moment, there is no way for Bluetooth discoverability
// to be turned on except through the Easy Unlock setup. If we step on any
// toes in the future then we need to revisit this guard.
if (adapter_->IsDiscoverable())
TurnOffBluetoothDiscoverability();
#if !defined(OS_CHROMEOS)
// Bluetooth detection causes serious performance degradations on Mac
// and possibly other platforms as well: http://crbug.com/467316
......@@ -157,6 +151,12 @@ class EasyUnlockService::BluetoothDetector
// TODO(bcwhite,xiyuan): Revisit when non-chromeos platforms are supported.
adapter_->RemoveObserver(this);
adapter_ = NULL;
#else
// TODO(tengs): At the moment, there is no way for Bluetooth discoverability
// to be turned on except through the Easy Unlock setup. If we step on any
// toes in the future then we need to revisit this guard.
if (adapter_->IsDiscoverable())
TurnOffBluetoothDiscoverability();
#endif // !defined(OS_CHROMEOS)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment