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

Unified Diff: chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc

Issue 1425093004: Revert of This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Created 5 years, 2 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/policy/cloud_external_data_policy_observer_unittest.cc
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc
index e963d025555cfd4f6d6c9c35ffffd9d2a67b5bea..95982a3d9b588144754bf7ce1e2231c7247f46f5 100644
--- a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc
+++ b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc
@@ -123,7 +123,7 @@
void RefreshDeviceLocalAccountPolicy(DeviceLocalAccountPolicyBroker* broker);
- void LogInAsDeviceLocalAccount(const AccountId& account_id);
+ void LogInAsDeviceLocalAccount(const std::string& user_id);
void SetRegularUserAvatarPolicy(const std::string& value);
@@ -320,12 +320,13 @@
}
void CloudExternalDataPolicyObserverTest::LogInAsDeviceLocalAccount(
- const AccountId& account_id) {
- user_manager_->AddUser(account_id);
+ const std::string& user_id) {
+ user_manager_->AddUser(user_id);
device_local_account_policy_provider_.reset(
new DeviceLocalAccountPolicyProvider(
- account_id.GetUserEmail(), device_local_account_policy_service_.get(),
+ user_id,
+ device_local_account_policy_service_.get(),
scoped_ptr<PolicyMap>()));
PolicyServiceImpl::Providers providers;
@@ -334,11 +335,10 @@
builder.SetPolicyService(
scoped_ptr<PolicyService>(new PolicyServiceImpl(providers)));
builder.SetPath(chromeos::ProfileHelper::Get()->GetProfilePathByUserIdHash(
- chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting(
- account_id.GetUserEmail())));
+ chromeos::ProfileHelper::GetUserIdHashByUserIdForTesting(user_id)));
profile_ = builder.Build();
- profile_->set_profile_name(account_id.GetUserEmail());
+ profile_->set_profile_name(user_id);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
@@ -363,7 +363,7 @@
}
void CloudExternalDataPolicyObserverTest::LogInAsRegularUser() {
- user_manager_->AddUser(AccountId::FromUserEmail(kRegularUserID));
+ user_manager_->AddUser(kRegularUserID);
PolicyServiceImpl::Providers providers;
providers.push_back(&user_policy_provider_);
@@ -661,7 +661,7 @@
CreateObserver();
- LogInAsDeviceLocalAccount(AccountId::FromUserEmail(kDeviceLocalAccount));
+ LogInAsDeviceLocalAccount(kDeviceLocalAccount);
EXPECT_TRUE(set_calls_.empty());
EXPECT_TRUE(cleared_calls_.empty());

Powered by Google App Engine
This is Rietveld 408576698