OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |