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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 508433004: Store local auth credentials after successful login or re-auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ifdef Created 6 years, 4 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
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index 25dce577bab4195c74b0dca0db4b15ab9c30bd84..a805bd119831e59558d60c81b1b43f6a6812efff 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/about_signin_internals_factory.h"
#include "chrome/browser/signin/chrome_signin_client_factory.h"
+#include "chrome/browser/signin/local_auth.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -115,10 +116,19 @@ void InlineSigninHelper::OnSigninOAuthInformationAvailable(
}
AboutSigninInternals* about_signin_internals =
- AboutSigninInternalsFactory::GetForProfile(profile_);
+ AboutSigninInternalsFactory::GetForProfile(profile_);
about_signin_internals->OnRefreshTokenReceived("Successful");
signin::Source source = signin::GetSourceForPromoURL(current_url_);
+
+ std::string primary_email =
+ SigninManagerFactory::GetForProfile(profile_)->GetAuthenticatedUsername();
+ if (gaia::AreEmailsSame(email, primary_email) &&
+ source == signin::SOURCE_REAUTH &&
+ switches::IsNewProfileManagement()) {
+ chrome::SetLocalAuthCredentials(profile_, password_);
+ }
+
if (source == signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT ||
source == signin::SOURCE_REAUTH) {
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
« no previous file with comments | « chrome/browser/signin/chrome_signin_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698