| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/prefs/pref_change_registrar.h" | 10 #include "base/prefs/pref_change_registrar.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class SAMLOfflineSigninLimiter : public KeyedService { | 32 class SAMLOfflineSigninLimiter : public KeyedService { |
| 33 public: | 33 public: |
| 34 // Registers preferences. | 34 // Registers preferences. |
| 35 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 35 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 36 | 36 |
| 37 // Called when the user successfully authenticates. |auth_flow| indicates | 37 // Called when the user successfully authenticates. |auth_flow| indicates |
| 38 // the type of authentication flow that the user went through. | 38 // the type of authentication flow that the user went through. |
| 39 void SignedIn(UserContext::AuthFlow auth_flow); | 39 void SignedIn(UserContext::AuthFlow auth_flow); |
| 40 | 40 |
| 41 // KeyedService: | 41 // KeyedService: |
| 42 virtual void Shutdown() OVERRIDE; | 42 virtual void Shutdown() override; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 friend class SAMLOfflineSigninLimiterFactory; | 45 friend class SAMLOfflineSigninLimiterFactory; |
| 46 friend class SAMLOfflineSigninLimiterTest; | 46 friend class SAMLOfflineSigninLimiterTest; |
| 47 | 47 |
| 48 // |profile| and |clock| must remain valid until Shutdown() is called. If | 48 // |profile| and |clock| must remain valid until Shutdown() is called. If |
| 49 // |clock| is NULL, the |default_clock_| will be used. | 49 // |clock| is NULL, the |default_clock_| will be used. |
| 50 SAMLOfflineSigninLimiter(Profile* profile, base::Clock* clock); | 50 SAMLOfflineSigninLimiter(Profile* profile, base::Clock* clock); |
| 51 virtual ~SAMLOfflineSigninLimiter(); | 51 virtual ~SAMLOfflineSigninLimiter(); |
| 52 | 52 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 scoped_ptr<base::OneShotTimer<SAMLOfflineSigninLimiter> > | 69 scoped_ptr<base::OneShotTimer<SAMLOfflineSigninLimiter> > |
| 70 offline_signin_limit_timer_; | 70 offline_signin_limit_timer_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(SAMLOfflineSigninLimiter); | 72 DISALLOW_COPY_AND_ASSIGN(SAMLOfflineSigninLimiter); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace chromeos | 75 } // namespace chromeos |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ | 77 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SAML_SAML_OFFLINE_SIGNIN_LIMITER_H_ |
| OLD | NEW |