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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 if (!password.empty() && profiles::IsLockAvailable(profile_)) | 273 if (!password.empty() && profiles::IsLockAvailable(profile_)) |
274 LocalAuth::SetLocalAuthCredentials(profile_, password); | 274 LocalAuth::SetLocalAuthCredentials(profile_, password); |
275 #endif | 275 #endif |
276 } | 276 } |
277 | 277 |
278 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) { | 278 void ChromeSigninClient::PreSignOut(const base::Callback<void()>& sign_out) { |
279 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 279 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
280 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() && | 280 if (is_force_signin_enabled_ && !profile_->IsSystemProfile() && |
281 !profile_->IsGuestSession() && !profile_->IsSupervised()) { | 281 !profile_->IsGuestSession() && !profile_->IsSupervised()) { |
282 BrowserList::CloseAllBrowsersWithProfile( | 282 BrowserList::CloseAllBrowsersWithProfile( |
283 profile_, base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess, | 283 profile_, |
284 base::Unretained(this), sign_out), | 284 base::Bind(&ChromeSigninClient::OnCloseBrowsersSuccess, |
| 285 base::Unretained(this), sign_out), |
285 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted, | 286 base::Bind(&ChromeSigninClient::OnCloseBrowsersAborted, |
286 base::Unretained(this))); | 287 base::Unretained(this)), |
| 288 false); |
287 } else { | 289 } else { |
288 #else | 290 #else |
289 { | 291 { |
290 #endif | 292 #endif |
291 SigninClient::PreSignOut(sign_out); | 293 SigninClient::PreSignOut(sign_out); |
292 } | 294 } |
293 } | 295 } |
294 | 296 |
295 void ChromeSigninClient::OnErrorChanged() { | 297 void ChromeSigninClient::OnErrorChanged() { |
296 // Some tests don't have a ProfileManager. | 298 // Some tests don't have a ProfileManager. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 return; | 459 return; |
458 entry->LockForceSigninProfile(true); | 460 entry->LockForceSigninProfile(true); |
459 } | 461 } |
460 | 462 |
461 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) { | 463 void ChromeSigninClient::ShowUserManager(const base::FilePath& profile_path) { |
462 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 464 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
463 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL, | 465 UserManager::Show(profile_path, profiles::USER_MANAGER_NO_TUTORIAL, |
464 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); | 466 profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION); |
465 #endif | 467 #endif |
466 } | 468 } |
OLD | NEW |