| 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 CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| 6 #define CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ | 6 #define CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
| 14 #include "chromeos/login/auth/auth_attempt_state_resolver.h" | 14 #include "chromeos/login/auth/auth_attempt_state_resolver.h" |
| 15 #include "chromeos/login/auth/user_context.h" | 15 #include "chromeos/login/auth/user_context.h" |
| 16 | 16 |
| 17 namespace base { |
| 18 class MessageLoopProxy; |
| 19 } // namespace base |
| 20 |
| 17 namespace net { | 21 namespace net { |
| 18 class URLRequestContextGetter; | 22 class URLRequestContextGetter; |
| 19 } | 23 } // namespace net |
| 20 | 24 |
| 21 namespace chromeos { | 25 namespace chromeos { |
| 22 | 26 |
| 23 class AuthAttemptState; | 27 class AuthAttemptState; |
| 24 class OnlineAttempt; | 28 class OnlineAttempt; |
| 25 class UserContext; | |
| 26 | 29 |
| 27 // Helper class which hosts OnlineAttempt for online credentials checking. | 30 // Helper class which hosts OnlineAttempt for online credentials checking. |
| 28 class CHROMEOS_EXPORT OnlineAttemptHost : public AuthAttemptStateResolver { | 31 class CHROMEOS_EXPORT OnlineAttemptHost : public AuthAttemptStateResolver { |
| 29 public: | 32 public: |
| 30 class Delegate { | 33 class Delegate { |
| 31 public: | 34 public: |
| 32 // Called after user_context were checked online. | 35 // Called after user_context were checked online. |
| 33 virtual void OnChecked(const std::string& username, bool success) = 0; | 36 virtual void OnChecked(const std::string& username, bool success) = 0; |
| 34 }; | 37 }; |
| 35 | 38 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 62 scoped_ptr<OnlineAttempt> online_attempt_; | 65 scoped_ptr<OnlineAttempt> online_attempt_; |
| 63 scoped_ptr<AuthAttemptState> state_; | 66 scoped_ptr<AuthAttemptState> state_; |
| 64 base::WeakPtrFactory<OnlineAttemptHost> weak_ptr_factory_; | 67 base::WeakPtrFactory<OnlineAttemptHost> weak_ptr_factory_; |
| 65 | 68 |
| 66 DISALLOW_COPY_AND_ASSIGN(OnlineAttemptHost); | 69 DISALLOW_COPY_AND_ASSIGN(OnlineAttemptHost); |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 } // namespace chromeos | 72 } // namespace chromeos |
| 70 | 73 |
| 71 #endif // CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ | 74 #endif // CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| OLD | NEW |