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

Unified Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 290483003: Tame the proliferation of UserContext constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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/login/login_utils_browsertest.cc
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc
index b99d42f5fe1d71b7bab1d02728b9d562c766b9ba..f0c2dc8c2ff2b1f1639ee1e457534d1d8d8b2347 100644
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc
@@ -397,25 +397,22 @@ class LoginUtilsTest : public testing::Test,
scoped_refptr<Authenticator> authenticator =
LoginUtils::Get()->CreateAuthenticator(this);
+ UserContext user_context(username);
+ user_context.SetPassword("password");
+ user_context.SetUserIDHash(username);
authenticator->CompleteLogin(ProfileHelper::GetSigninProfile(),
- UserContext(username,
- "password",
- std::string(),
- username)); // username_hash
+ user_context);
- const bool kUsingOAuth = true;
// Setting |kHasCookies| to false prevents ProfileAuthData::Transfer from
// waiting for an IO task before proceeding.
const bool kHasCookies = false;
const bool kHasActiveSession = false;
- LoginUtils::Get()->PrepareProfile(
- UserContext(username,
- "password",
- std::string(),
- username,
- kUsingOAuth,
- UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML),
- std::string(), kHasCookies, kHasActiveSession, this);
+ user_context.SetAuthFlow(UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML);
+ LoginUtils::Get()->PrepareProfile(user_context,
+ std::string(),
+ kHasCookies,
+ kHasActiveSession,
+ this);
device_settings_test_helper.Flush();
RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698