diff options
author | rogerta <rogerta@chromium.org> | 2014-08-27 14:51:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-27 21:54:13 +0000 |
commit | f15548e894657da4ec5eca5680e45d2253d34852 (patch) | |
tree | 88d5573cf8680233b9b9824b6390ffa8750385ff /chrome/browser/policy/cloud | |
parent | 47106fe835d8d8aca61704d5d5a07bc8ea88fdf5 (diff) | |
download | chromium_src-f15548e894657da4ec5eca5680e45d2253d34852.zip chromium_src-f15548e894657da4ec5eca5680e45d2253d34852.tar.gz chromium_src-f15548e894657da4ec5eca5680e45d2253d34852.tar.bz2 |
Add IsAuthenticated() method to SigninManager to check for connected profile.
Make sure callers are using GetAuthenticatedUsername and GetAuthenticatedAccountId correctly.
BUG=341408
TBR=bauerb@chromium.org, benwells@chromium.org, gene@chromium.org, asvitkine@chromium.org, noms@chromium.org, tim@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/479353003
Cr-Commit-Position: refs/heads/master@{#292235}
Diffstat (limited to 'chrome/browser/policy/cloud')
-rw-r--r-- | chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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 51db158..602b1d4 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc @@ -212,7 +212,7 @@ class UserPolicySigninServiceTest : public testing::Test { virtual void AddProfile() { // For this test, the user should not be signed in yet. - DCHECK(signin_manager_->GetAuthenticatedUsername().empty()); + DCHECK(!signin_manager_->IsAuthenticated()); // Initializing UserPolicySigninService while the user is not signed in // should result in the store being cleared to remove any lingering policy. @@ -394,8 +394,8 @@ class UserPolicySigninServiceSignedInTest : public UserPolicySigninServiceTest { TEST_F(UserPolicySigninServiceTest, InitWhileSignedOut) { // Make sure user is not signed in. - ASSERT_TRUE(SigninManagerFactory::GetForProfile(profile_.get())-> - GetAuthenticatedUsername().empty()); + ASSERT_FALSE(SigninManagerFactory::GetForProfile(profile_.get())-> + IsAuthenticated()); // UserCloudPolicyManager should not be initialized. ASSERT_FALSE(manager_->core()->service()); |