Chromium Code Reviews| 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); |
| } |
| } |