Index: chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc |
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc |
index 55ae8d1f99feb15a21179ae1f9e1d73ef72658c4..d4fa2faa5685c7ddd371abeb572815163983e9f7 100644 |
--- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc |
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc |
@@ -120,21 +120,19 @@ class UserPolicySigninServiceTest : public testing::Test { |
// Policy client registration on Android depends on Token Service having |
// a valid login token, while on other platforms, the login refresh token |
// is specified directly. |
+ UserPolicySigninServiceBase::PolicyRegistrationCallback callback = |
+ base::Bind(&UserPolicySigninServiceTest::OnRegisterCompleted, |
+ base::Unretained(this)); |
#if defined(OS_ANDROID) |
GetTokenService()->UpdateCredentials( |
AccountTrackerService::PickAccountIdForAccount( |
profile_.get()->GetPrefs(), kTestGaiaId, kTestUser), |
"oauth2_login_refresh_token"); |
-#endif |
- service->RegisterForPolicy( |
- kTestUser, |
-#if defined(OS_ANDROID) |
- kTestGaiaId, |
+ service->RegisterForPolicyWithAccountId(kTestUser, kTestGaiaId, callback); |
#else |
- "mock_oauth_token", |
+ service->RegisterForPolicyWithLoginToken(kTestUser, "mock_oauth_token", |
+ callback); |
#endif |
- base::Bind(&UserPolicySigninServiceTest::OnRegisterCompleted, |
- base::Unretained(this))); |
ASSERT_TRUE(IsRequestActive()); |
} |