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

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

Issue 2712883005: Sign out profile when local_state file has been changed. (Closed)
Patch Set: Merge from master Created 3 years, 9 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/token_revoker_test_utils.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index 142e59802325ec7607d0b910c00f6291bfe72438..6698269a107337f3cb8532f41238b724d85a19bb 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/local_auth.h"
+#include "chrome/browser/signin/signin_util.h"
#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_dialogs.h"
@@ -1010,12 +1011,16 @@ void UserManagerScreenHandler::OnBrowserWindowReady(Browser* browser) {
// Unlock the profile after browser opens so startup can read the lock bit.
// Any necessary authentication must have been successful to reach this point.
+ ProfileAttributesEntry* entry = nullptr;
if (!browser->profile()->IsGuestSession()) {
- ProfileAttributesEntry* entry = nullptr;
bool has_entry = g_browser_process->profile_manager()->
GetProfileAttributesStorage().
GetProfileAttributesWithPath(browser->profile()->GetPath(), &entry);
DCHECK(has_entry);
+ // If force sign in is enabled and profile is not signed in, do not close
+ // UserManager and unlock profile.
+ if (signin_util::IsForceSigninEnabled() && !entry->IsAuthenticated())
+ return;
entry->SetIsSigninRequired(false);
}
« no previous file with comments | « chrome/browser/signin/token_revoker_test_utils.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698