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

Unified Diff: chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc

Issue 1412813003: 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: Fix Win GN build. Created 5 years, 1 month 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/signin/easy_unlock_service_unittest_chromeos.cc
diff --git a/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc b/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc
index ffd15e02db2eb93c29ac50eecd9e567c04c37a7c..743677811c670d84250ff4c2dec9986977eea62b 100644
--- a/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc
+++ b/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc
@@ -21,6 +21,7 @@
#include "chrome/test/base/testing_profile.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_power_manager_client.h"
+#include "components/signin/core/account_id/account_id.h"
#include "components/signin/core/browser/signin_manager_base.h"
#include "components/syncable_prefs/testing_pref_service_syncable.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -218,7 +219,7 @@ class EasyUnlockServiceTest : public testing::Test {
ON_CALL(*mock_user_manager_, IsCurrentUserNonCryptohomeDataEphemeral())
.WillByDefault(Return(false));
- SetUpProfile(&profile_, kTestUserPrimary);
+ SetUpProfile(&profile_, AccountId::FromUserEmail(kTestUserPrimary));
}
void TearDown() override {
@@ -262,13 +263,14 @@ class EasyUnlockServiceTest : public testing::Test {
}
void SetUpSecondaryProfile() {
- SetUpProfile(&secondary_profile_, kTestUserSecondary);
+ SetUpProfile(&secondary_profile_,
+ AccountId::FromUserEmail(kTestUserSecondary));
}
private:
// Sets up a test profile with a user id.
void SetUpProfile(scoped_ptr<TestingProfile>* profile,
- const std::string& user_id) {
+ const AccountId& account_id) {
ASSERT_TRUE(profile);
ASSERT_FALSE(profile->get());
@@ -277,12 +279,13 @@ class EasyUnlockServiceTest : public testing::Test {
&CreateEasyUnlockServiceForTest);
*profile = builder.Build();
- mock_user_manager_->AddUser(user_id);
- profile->get()->set_profile_name(user_id);
+ mock_user_manager_->AddUser(account_id);
+ profile->get()->set_profile_name(account_id.GetUserEmail());
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(profile->get());
- signin_manager->SetAuthenticatedAccountInfo(user_id, user_id);
+ signin_manager->SetAuthenticatedAccountInfo(account_id.GetUserEmail(),
+ account_id.GetUserEmail());
}
protected:

Powered by Google App Engine
This is Rietveld 408576698