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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 2547083004: Fix Check failure in ProfileManager when force-sign-in is enabled and last used profile is supervis… (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 unified diff | Download patch
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 301 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
302 // Don't store password hash except when lock is available for the user. 302 // Don't store password hash except when lock is available for the user.
303 if (!password.empty() && profiles::IsLockAvailable(profile_)) 303 if (!password.empty() && profiles::IsLockAvailable(profile_))
304 LocalAuth::SetLocalAuthCredentials(profile_, password); 304 LocalAuth::SetLocalAuthCredentials(profile_, password);
305 #endif 305 #endif
306 } 306 }
307 307
308 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) { 308 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) {
309 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 309 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
310 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() && 310 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() &&
311 !profile_->IsGuestSession()) { 311 !profile_->IsGuestSession() && !profile_->IsSupervised()) {
312 BrowserList::CloseAllBrowsersWithProfile( 312 BrowserList::CloseAllBrowsersWithProfile(
313 profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess, 313 profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess,
314 base::Unretained(this), sign_out), 314 base::Unretained(this), sign_out),
315 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted, 315 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted,
316 base::Unretained(this))); 316 base::Unretained(this)));
317 } else { 317 } else {
318 #else 318 #else
319 { 319 {
320 #endif 320 #endif
321 SigninClient::PreSignOut(sign_out); 321 SigninClient::PreSignOut(sign_out);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 return; 491 return;
492 entry->LockForceSigninProfile(true); 492 entry->LockForceSigninProfile(true);
493 } 493 }
494 494
495 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) { 495 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) {
496 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 496 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
497 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL, 497 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL,
498 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); 498 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
499 #endif 499 #endif
500 } 500 }
OLDNEW
« no previous file with comments | « no previous file | components/signin/core/browser/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698