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/users/user.h" |
16 #include "chrome/browser/chromeos/login/users/user_manager.h" | 17 #include "chrome/browser/chromeos/login/users/user_manager.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 | 21 |
21 namespace chromeos { | 22 namespace chromeos { |
22 | 23 |
23 namespace { | 24 namespace { |
24 | 25 |
25 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. | 26 const int kDefaultSAMLOfflineSigninTimeLimit = 14 * 24 * 60 * 60; // 14 days. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 if (!user) { | 143 if (!user) { |
143 NOTREACHED(); | 144 NOTREACHED(); |
144 return; | 145 return; |
145 } | 146 } |
146 | 147 |
147 UserManager::Get()->SaveForceOnlineSignin(user->email(), true); | 148 UserManager::Get()->SaveForceOnlineSignin(user->email(), true); |
148 offline_signin_limit_timer_.reset(); | 149 offline_signin_limit_timer_.reset(); |
149 } | 150 } |
150 | 151 |
151 } // namespace chromeos | 152 } // namespace chromeos |
OLD | NEW |