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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1866813002: Remove StartupUtils::IsWebviewSigninEnabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Remove TODO Created 4 years 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
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/startup_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 2b9a0bcc65a0e47a2741eb3ba2a4a37a7a2ecf00..e6956a986cec0d3f2bab7d67b788b8b472701de5 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -1544,21 +1544,11 @@ void UserSessionManager::UpdateEasyUnlockKeys(const UserContext& user_context) {
net::URLRequestContextGetter*
UserSessionManager::GetAuthRequestContext() const {
- net::URLRequestContextGetter* auth_request_context = nullptr;
-
- if (StartupUtils::IsWebviewSigninEnabled()) {
- // Webview uses different partition storage than iframe. We need to get
- // cookies from the right storage for url request to get auth token into
- // session.
- content::StoragePartition* signin_partition = login::GetSigninPartition();
- if (signin_partition)
- auth_request_context = signin_partition->GetURLRequestContext();
- } else if (authenticator_.get() && authenticator_->authentication_context()) {
- auth_request_context =
- content::BrowserContext::GetDefaultStoragePartition(
- authenticator_->authentication_context())->GetURLRequestContext();
- }
- return auth_request_context;
+ content::StoragePartition* signin_partition = login::GetSigninPartition();
+ if (!signin_partition)
+ return nullptr;
+
+ return signin_partition->GetURLRequestContext();
}
void UserSessionManager::AttemptRestart(Profile* profile) {
@@ -1791,16 +1781,17 @@ void UserSessionManager::SendUserPodsMetrics() {
}
void UserSessionManager::OnOAuth2TokensFetched(UserContext context) {
- if (StartupUtils::IsWebviewSigninEnabled() && TokenHandlesEnabled()) {
- CreateTokenUtilIfMissing();
- if (!token_handle_util_->HasToken(context.GetAccountId())) {
- token_handle_fetcher_.reset(new TokenHandleFetcher(
- token_handle_util_.get(), context.GetAccountId()));
- token_handle_fetcher_->FillForNewUser(
- context.GetAccessToken(),
- base::Bind(&UserSessionManager::OnTokenHandleObtained,
- weak_factory_.GetWeakPtr()));
- }
+ if (!TokenHandlesEnabled())
+ return;
+
+ CreateTokenUtilIfMissing();
+ if (!token_handle_util_->HasToken(context.GetAccountId())) {
+ token_handle_fetcher_.reset(new TokenHandleFetcher(token_handle_util_.get(),
+ context.GetAccountId()));
+ token_handle_fetcher_->FillForNewUser(
+ context.GetAccessToken(),
+ base::Bind(&UserSessionManager::OnTokenHandleObtained,
+ weak_factory_.GetWeakPtr()));
}
}
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/startup_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698