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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2357053002: Always use arc::InstanceHolder<T>::GetInstanceForMethod (Closed)
Patch Set: Address comments from Luis 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2e8ad05bd143a9f806fc4a988984218bdba50906..4263d1468290b74e864aeb3b679020dd66141d83 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -229,8 +229,9 @@ 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");
+ CHECK(instance);
dcheng 2016/09/24 00:25:25 We should prefer DCHECK() over CHECK() to document
dcheng 2016/09/24 00:27:13 See https://chromium.googlesource.com/chromium/src
Yusuke Sato 2016/09/24 00:50:54 Done.
Yusuke Sato 2016/09/24 00:50:54 Acknowledged.
+ instance->Init(binding_.CreateInterfacePtrAndBind());
}
void ArcAuthService::OnBridgeStopped(ArcBridgeService::StopReason reason) {
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698