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

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

Issue 2599673005: arc: Use GET_INTERFACE_FOR_METHOD macro (Closed)
Patch Set: Added a conversion I missed Created 3 years, 11 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 3440767dea4be965855db4e8c848c1b36d1d6870..658797975a9cd66dae70df6f56ee5e80e94985e2 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -27,8 +27,6 @@ namespace {
ArcAuthService* g_arc_auth_service = nullptr;
-constexpr uint32_t kMinVersionForOnAccountInfoReady = 5;
-
// Convers mojom::ArcSignInFailureReason into ProvisiningResult.
ProvisioningResult ConvertArcSignInFailureReasonToProvisioningResult(
mojom::ArcSignInFailureReason reason) {
@@ -145,7 +143,7 @@ ArcAuthService* ArcAuthService::GetForTest() {
}
void ArcAuthService::OnInstanceReady() {
- auto* instance = arc_bridge_service()->auth()->GetInstanceForMethod("Init");
+ auto* instance = GET_INSTANCE_FOR_METHOD(arc_bridge_service()->auth(), Init);
DCHECK(instance);
instance->Init(binding_.CreateInterfacePtrAndBind());
}
@@ -173,8 +171,8 @@ void ArcAuthService::RequestAccountInfo() {
void ArcAuthService::OnAccountInfoReady(mojom::AccountInfoPtr account_info) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- auto* instance = arc_bridge_service()->auth()->GetInstanceForMethod(
- "OnAccountInfoReady", kMinVersionForOnAccountInfoReady);
+ auto* instance =
+ GET_INSTANCE_FOR_METHOD(arc_bridge_service()->auth(), OnAccountInfoReady);
DCHECK(instance);
instance->OnAccountInfoReady(std::move(account_info));
}

Powered by Google App Engine
This is Rietveld 408576698