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_AUTH_CHROME_LOGIN_PERFORMER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class WildcardLoginChecker; | 25 class WildcardLoginChecker; |
26 } | 26 } |
27 | 27 |
28 namespace chromeos { | 28 namespace chromeos { |
29 | 29 |
30 // This class implements chrome-specific elements of Login Performer. | 30 // This class implements chrome-specific elements of Login Performer. |
31 | 31 |
32 class ChromeLoginPerformer : public LoginPerformer { | 32 class ChromeLoginPerformer : public LoginPerformer { |
33 public: | 33 public: |
34 explicit ChromeLoginPerformer(Delegate* delegate); | 34 explicit ChromeLoginPerformer(Delegate* delegate); |
35 virtual ~ChromeLoginPerformer(); | 35 ~ChromeLoginPerformer() override; |
36 | 36 |
37 protected: | 37 protected: |
38 virtual bool RunTrustedCheck(const base::Closure& callback) override; | 38 bool RunTrustedCheck(const base::Closure& callback) override; |
39 void DidRunTrustedCheck(const base::Closure& callback); | 39 void DidRunTrustedCheck(const base::Closure& callback); |
40 virtual bool IsUserWhitelisted(const std::string& user_id, | 40 bool IsUserWhitelisted(const std::string& user_id, |
41 bool* wildcard_match) override; | 41 bool* wildcard_match) override; |
42 | 42 |
43 virtual void RunOnlineWhitelistCheck( | 43 void RunOnlineWhitelistCheck(const std::string& user_id, |
44 const std::string& user_id, | 44 bool wildcard_match, |
45 bool wildcard_match, | 45 const base::Closure& success_callback, |
46 const base::Closure& success_callback, | 46 const base::Closure& failure_callback) override; |
47 const base::Closure& failure_callback) override; | 47 bool AreSupervisedUsersAllowed() override; |
48 virtual bool AreSupervisedUsersAllowed() override; | |
49 | 48 |
50 virtual bool UseExtendedAuthenticatorForSupervisedUser( | 49 bool UseExtendedAuthenticatorForSupervisedUser( |
51 const UserContext& user_context) override; | 50 const UserContext& user_context) override; |
52 | 51 |
53 virtual UserContext TransformSupervisedKey( | 52 UserContext TransformSupervisedKey(const UserContext& context) override; |
54 const UserContext& context) override; | |
55 | 53 |
56 virtual void SetupSupervisedUserFlow(const std::string& user_id) override; | 54 void SetupSupervisedUserFlow(const std::string& user_id) override; |
57 | 55 |
58 virtual void SetupEasyUnlockUserFlow(const std::string& user_id) override; | 56 void SetupEasyUnlockUserFlow(const std::string& user_id) override; |
59 | 57 |
60 virtual scoped_refptr<Authenticator> CreateAuthenticator() override; | 58 scoped_refptr<Authenticator> CreateAuthenticator() override; |
61 virtual bool CheckPolicyForUser(const std::string& user_id) override; | 59 bool CheckPolicyForUser(const std::string& user_id) override; |
62 virtual content::BrowserContext* GetSigninContext() override; | 60 content::BrowserContext* GetSigninContext() override; |
63 virtual net::URLRequestContextGetter* GetSigninRequestContext() override; | 61 net::URLRequestContextGetter* GetSigninRequestContext() override; |
64 | 62 |
65 private: | 63 private: |
66 void OnlineWildcardLoginCheckCompleted( | 64 void OnlineWildcardLoginCheckCompleted( |
67 const base::Closure& success_callback, | 65 const base::Closure& success_callback, |
68 const base::Closure& failure_callback, | 66 const base::Closure& failure_callback, |
69 policy::WildcardLoginChecker::Result result); | 67 policy::WildcardLoginChecker::Result result); |
70 | 68 |
71 // Used to verify logins that matched wildcard on the login whitelist. | 69 // Used to verify logins that matched wildcard on the login whitelist. |
72 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_; | 70 scoped_ptr<policy::WildcardLoginChecker> wildcard_login_checker_; |
73 base::WeakPtrFactory<ChromeLoginPerformer> weak_factory_; | 71 base::WeakPtrFactory<ChromeLoginPerformer> weak_factory_; |
74 | 72 |
75 DISALLOW_COPY_AND_ASSIGN(ChromeLoginPerformer); | 73 DISALLOW_COPY_AND_ASSIGN(ChromeLoginPerformer); |
76 }; | 74 }; |
77 | 75 |
78 } // namespace chromeos | 76 } // namespace chromeos |
79 | 77 |
80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_ | 78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_CHROME_LOGIN_PERFORMER_H_ |
OLD | NEW |