| Index: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
|
| diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
|
| index 9a5385f43352ff53a0b7f3ea7cc2122fb0afa4b9..c96e922adc1e9bbe568c771d455df5158bd22dd5 100644
|
| --- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
|
| +++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
|
| @@ -131,7 +131,7 @@
|
| class CryptohomeAuthenticatorTest : public testing::Test {
|
| public:
|
| CryptohomeAuthenticatorTest()
|
| - : user_context_(AccountId::FromUserEmail("me@nowhere.org")),
|
| + : user_context_("me@nowhere.org"),
|
| user_manager_(new user_manager::FakeUserManager()),
|
| user_manager_enabler_(user_manager_),
|
| mock_caller_(NULL),
|
| @@ -142,8 +142,8 @@
|
| user_context_.SetKey(Key("fakepass"));
|
| user_context_.SetUserIDHash("me_nowhere_com_hash");
|
| const user_manager::User* user =
|
| - user_manager_->AddUser(user_context_.GetAccountId());
|
| - profile_.set_profile_name(user_context_.GetAccountId().GetUserEmail());
|
| + user_manager_->AddUser(user_context_.GetUserID());
|
| + profile_.set_profile_name(user_context_.GetUserID());
|
|
|
| ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, &profile_);
|
|
|
| @@ -264,12 +264,13 @@
|
| cryptohome::KeyDefinition::ProviderData("salt"));
|
| key_definition.provider_data.back().bytes = salt.Pass();
|
| }
|
| - EXPECT_CALL(*mock_homedir_methods_,
|
| - GetKeyDataEx(cryptohome::Identification(
|
| - user_context_.GetAccountId().GetUserEmail()),
|
| - kCryptohomeGAIAKeyLabel, _))
|
| + EXPECT_CALL(*mock_homedir_methods_, GetKeyDataEx(
|
| + cryptohome::Identification(user_context_.GetUserID()),
|
| + kCryptohomeGAIAKeyLabel,
|
| + _))
|
| .WillOnce(WithArg<2>(Invoke(
|
| - this, &CryptohomeAuthenticatorTest::InvokeGetDataExCallback)));
|
| + this,
|
| + &CryptohomeAuthenticatorTest::InvokeGetDataExCallback)));
|
| }
|
|
|
| void ExpectMountExCall(bool expect_create_attempt) {
|
| @@ -284,9 +285,10 @@
|
| cryptohome::PRIV_DEFAULT));
|
| }
|
| EXPECT_CALL(*mock_homedir_methods_,
|
| - MountEx(cryptohome::Identification(
|
| - user_context_.GetAccountId().GetUserEmail()),
|
| - cryptohome::Authorization(auth_key), mount, _))
|
| + MountEx(cryptohome::Identification(user_context_.GetUserID()),
|
| + cryptohome::Authorization(auth_key),
|
| + mount,
|
| + _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
| }
|
| @@ -560,8 +562,7 @@
|
| // Set up mock async method caller to respond successfully to a cryptohome
|
| // remove attempt.
|
| mock_caller_->SetUp(true, cryptohome::MOUNT_ERROR_NONE);
|
| - EXPECT_CALL(*mock_caller_,
|
| - AsyncRemove(user_context_.GetAccountId().GetUserEmail(), _))
|
| + EXPECT_CALL(*mock_caller_, AsyncRemove(user_context_.GetUserID(), _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
|
|
| @@ -583,8 +584,7 @@
|
|
|
| // Set up mock async method caller to fail a cryptohome remove attempt.
|
| mock_caller_->SetUp(false, cryptohome::MOUNT_ERROR_NONE);
|
| - EXPECT_CALL(*mock_caller_,
|
| - AsyncRemove(user_context_.GetAccountId().GetUserEmail(), _))
|
| + EXPECT_CALL(*mock_caller_, AsyncRemove(user_context_.GetUserID(), _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
|
|
| @@ -614,9 +614,10 @@
|
|
|
| // Set up mock async method caller to respond successfully to a key migration.
|
| mock_caller_->SetUp(true, cryptohome::MOUNT_ERROR_NONE);
|
| - EXPECT_CALL(*mock_caller_,
|
| - AsyncMigrateKey(user_context_.GetAccountId().GetUserEmail(), _,
|
| - transformed_key_.GetSecret(), _))
|
| + EXPECT_CALL(
|
| + *mock_caller_,
|
| + AsyncMigrateKey(
|
| + user_context_.GetUserID(), _, transformed_key_.GetSecret(), _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
|
|
| @@ -639,9 +640,10 @@
|
| // Set up mock async method caller to fail a key migration attempt,
|
| // asserting that the wrong password was used.
|
| mock_caller_->SetUp(false, cryptohome::MOUNT_ERROR_KEY_FAILURE);
|
| - EXPECT_CALL(*mock_caller_,
|
| - AsyncMigrateKey(user_context_.GetAccountId().GetUserEmail(), _,
|
| - transformed_key_.GetSecret(), _))
|
| + EXPECT_CALL(
|
| + *mock_caller_,
|
| + AsyncMigrateKey(
|
| + user_context_.GetUserID(), _, transformed_key_.GetSecret(), _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
|
|
| @@ -730,8 +732,7 @@
|
| // Set up mock async method caller to respond successfully to a cryptohome
|
| // key-check attempt.
|
| mock_caller_->SetUp(true, cryptohome::MOUNT_ERROR_NONE);
|
| - EXPECT_CALL(*mock_caller_,
|
| - AsyncCheckKey(user_context_.GetAccountId().GetUserEmail(), _, _))
|
| + EXPECT_CALL(*mock_caller_, AsyncCheckKey(user_context_.GetUserID(), _, _))
|
| .Times(1)
|
| .RetiresOnSaturation();
|
|
|
|
|