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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.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: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index fe6a2fc99a490c31084f2a6804525296b8bcc22c..8ab4d66357f88bbe706919fef6fec21bde0dde05 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -229,8 +229,10 @@ bool ArcAuthService::IsAllowedForProfile(const Profile* profile) {
}
void ArcAuthService::OnInstanceReady() {
- arc_bridge_service()->auth()->instance()->Init(
- binding_.CreateInterfacePtrAndBind());
+ auto* instance = arc_bridge_service()->auth()->GetInstanceForMethod("Init");
+ if (!instance)
Yusuke Sato 2016/09/21 18:27:48 Previously, OnInstanceReady() methods were written
Yusuke Sato 2016/09/22 22:26:28 Changed to CHECK() based on your feedback. PTAL.
+ return;
+ instance->Init(binding_.CreateInterfacePtrAndBind());
}
void ArcAuthService::OnBridgeStopped(ArcBridgeService::StopReason reason) {

Powered by Google App Engine
This is Rietveld 408576698