| 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" | |
| 14 #include "base/time/clock.h" | 13 #include "base/time/clock.h" |
| 15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 16 #include "chrome/browser/chromeos/login/reauth_stats.h" | 15 #include "chrome/browser/chromeos/login/reauth_stats.h" |
| 17 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 20 #include "components/pref_registry/pref_registry_syncable.h" | 19 #include "components/pref_registry/pref_registry_syncable.h" |
| 20 #include "components/prefs/pref_service.h" |
| 21 #include "components/user_manager/user.h" | 21 #include "components/user_manager/user.h" |
| 22 #include "components/user_manager/user_manager.h" | 22 #include "components/user_manager/user_manager.h" |
| 23 | 23 |
| 24 namespace chromeos { | 24 namespace chromeos { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. | 28 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 return; | 143 return; |
| 144 } | 144 } |
| 145 | 145 |
| 146 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->GetAccountId(), | 146 user_manager::UserManager::Get()->SaveForceOnlineSignin(user->GetAccountId(), |
| 147 true); | 147 true); |
| 148 RecordReauthReason(user->GetAccountId(), ReauthReason::SAML_REAUTH_POLICY); | 148 RecordReauthReason(user->GetAccountId(), ReauthReason::SAML_REAUTH_POLICY); |
| 149 offline_signin_limit_timer_.reset(); | 149 offline_signin_limit_timer_.reset(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace chromeos | 152 } // namespace chromeos |
| OLD | NEW |