| 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/chromeos/login/saml/saml_offline_signin_limiter.h" | 5 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
| 14 #include "base/time/clock.h" | 14 #include "base/time/clock.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chrome/browser/chromeos/login/reauth_stats.h" |
| 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 17 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 19 #include "components/pref_registry/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.h" |
| 20 #include "components/user_manager/user.h" | 21 #include "components/user_manager/user.h" |
| 21 #include "components/user_manager/user_manager.h" | 22 #include "components/user_manager/user_manager.h" |
| 22 | 23 |
| 23 namespace chromeos { | 24 namespace chromeos { |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 138 |
| 138 void SAMLOfflineSigninLimiter::ForceOnlineLogin() { | 139 void SAMLOfflineSigninLimiter::ForceOnlineLogin() { |
| 139 const user_manager::User* user = | 140 const user_manager::User* user = |
| 140 ProfileHelper::Get()->GetUserByProfile(profile_); | 141 ProfileHelper::Get()->GetUserByProfile(profile_); |
| 141 if (!user) { | 142 if (!user) { |
| 142 NOTREACHED(); | 143 NOTREACHED(); |
| 143 return; | 144 return; |
| 144 } | 145 } |
| 145 | 146 |
| 146 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->email(), true); | 147 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->email(), true); |
| 148 RecordReauthReason(user->email(), ReauthReason::SAML_REAUTH_POLICY); |
| 147 offline_signin_limit_timer_.reset(); | 149 offline_signin_limit_timer_.reset(); |
| 148 } | 150 } |
| 149 | 151 |
| 150 } // namespace chromeos | 152 } // namespace chromeos |
| OLD | NEW |