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

Unified Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 2357053002: Always use arc::InstanceHolder<T>::GetInstanceForMethod (Closed)
Patch Set: review Created 4 years, 3 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: components/arc/bluetooth/arc_bluetooth_bridge.cc
diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.cc b/components/arc/bluetooth/arc_bluetooth_bridge.cc
index e9385438299f23f6110b048e441f2e5b65c4f43d..e1e96c4ab27bbaf6d0c08ce7f3ce18170a4afd4e 100644
--- a/components/arc/bluetooth/arc_bluetooth_bridge.cc
+++ b/components/arc/bluetooth/arc_bluetooth_bridge.cc
@@ -282,19 +282,16 @@ void ArcBluetoothBridge::OnAdapterInitialized(
// register ourselves as an observer with it then. Since our adapter is
// ready, we should register it now.
if (!bluetooth_adapter_->HasObserver(this) &&
- arc_bridge_service()->bluetooth()->instance()) {
+ arc_bridge_service()->bluetooth()->HasInstance()) {
bluetooth_adapter_->AddObserver(this);
}
}
void ArcBluetoothBridge::OnInstanceReady() {
mojom::BluetoothInstance* bluetooth_instance =
- arc_bridge_service()->bluetooth()->instance();
- if (!bluetooth_instance) {
- LOG(ERROR) << "OnBluetoothInstanceReady called, "
- << "but no bluetooth instance found";
+ arc_bridge_service()->bluetooth()->GetInstanceForMethod("Init");
+ if (!bluetooth_instance)
return;
- }
bluetooth_instance->Init(binding_.CreateInterfacePtrAndBind());

Powered by Google App Engine
This is Rietveld 408576698