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

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

Issue 2528183002: Fix the bug which is login dialog won't close after the second sign-in to chrome with different acc… (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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 01b5876f7d3ba18c25505214b7a9164c62a1b937..1e6f110684d1ed9c31def253f90b79f04fcc1ae5 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -120,12 +120,14 @@ void CloseModalSigninIfNeeded(InlineLoginHandlerImpl* handler) {
void UnlockProfileAndHideLoginUI(const base::FilePath profile_path,
InlineLoginHandlerImpl* handler) {
- ProfileManager* profile_manager = g_browser_process->profile_manager();
- if (profile_manager) {
- ProfileAttributesEntry* entry;
- if (profile_manager->GetProfileAttributesStorage()
- .GetProfileAttributesWithPath(profile_path, &entry)) {
- entry->SetIsSigninRequired(false);
+ if (!profile_path.empty()) {
anthonyvd 2016/11/28 12:36:13 This should only be the case when sign in happens
+ ProfileManager* profile_manager = g_browser_process->profile_manager();
+ if (profile_manager) {
+ ProfileAttributesEntry* entry;
+ if (profile_manager->GetProfileAttributesStorage()
+ .GetProfileAttributesWithPath(profile_path, &entry)) {
+ entry->SetIsSigninRequired(false);
+ }
}
}
if (handler)
@@ -796,7 +798,7 @@ void InlineLoginHandlerImpl::FinishCompleteLogin(
// If opened from user manager to unlock a profile, make sure the user manager
// is closed and that the profile is marked as unlocked.
- if (!params.profile_path.empty() && !signin::IsForceSigninEnabled()) {
+ if (!signin::IsForceSigninEnabled()) {
UnlockProfileAndHideLoginUI(params.profile_path, params.handler);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698