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

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

Issue 2543843002: 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 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 1c0a30f31bb2ffaa5aabd8b9f98062094a3f071a..c82dd564deaf8a381d38f539f4935bdf418f9001 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -236,12 +236,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()) {
+ 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)
@@ -917,7 +919,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