Chromium Code Reviews| Index: chromeos/login/auth/online_attempt_host.h |
| diff --git a/chrome/browser/chromeos/login/auth/online_attempt_host.h b/chromeos/login/auth/online_attempt_host.h |
| similarity index 72% |
| rename from chrome/browser/chromeos/login/auth/online_attempt_host.h |
| rename to chromeos/login/auth/online_attempt_host.h |
| index e7d26727b0bff11b8ab4896a5f24718e494e5b73..7f080372e041b73e43c68cccdfbdecfb4825d6af 100644 |
| --- a/chrome/browser/chromeos/login/auth/online_attempt_host.h |
| +++ b/chromeos/login/auth/online_attempt_host.h |
| @@ -2,14 +2,15 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| -#define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| +#ifndef CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| +#define CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| #include <string> |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "chromeos/chromeos_export.h" |
| #include "chromeos/login/auth/auth_attempt_state_resolver.h" |
| #include "chromeos/login/auth/user_context.h" |
| @@ -17,6 +18,10 @@ namespace content { |
| class BrowserContext; |
|
Nikita (slow)
2014/07/24 15:25:59
not needed.
Denis Kuznetsov (DE-MUC)
2014/07/24 15:48:52
Done.
|
| } |
| +namespace net { |
| +class URLRequestContextGetter; |
| +} |
| + |
| namespace chromeos { |
| class AuthAttemptState; |
| @@ -24,15 +29,15 @@ class OnlineAttempt; |
| class UserContext; |
| // Helper class which hosts OnlineAttempt for online credentials checking. |
| -class OnlineAttemptHost : public AuthAttemptStateResolver { |
| +class CHROMEOS_EXPORT OnlineAttemptHost : public AuthAttemptStateResolver { |
| public: |
| class Delegate { |
| - public: |
| - // Called after user_context were checked online. |
| - virtual void OnChecked(const std::string& username, bool success) = 0; |
| + public: |
| + // Called after user_context were checked online. |
| + virtual void OnChecked(const std::string& username, bool success) = 0; |
| }; |
| - explicit OnlineAttemptHost(Delegate *delegate); |
| + explicit OnlineAttemptHost(Delegate* delegate); |
| virtual ~OnlineAttemptHost(); |
| // Performs an online check of the credentials in |user_context| and invokes |
| @@ -40,7 +45,7 @@ class OnlineAttemptHost : public AuthAttemptStateResolver { |
| // in progress at any given time. If this method is invoked with a different |
| // |user_context| than a check currently in progress, the current check will |
| // be silently aborted. |
| - void Check(content::BrowserContext* auth_context, |
| + void Check(net::URLRequestContextGetter* request_context, |
| const UserContext& user_context); |
| // Resets the checking process. |
| @@ -54,6 +59,7 @@ class OnlineAttemptHost : public AuthAttemptStateResolver { |
| void ResolveOnUIThread(bool success); |
| private: |
| + scoped_refptr<base::MessageLoopProxy> message_loop_; |
| Delegate* delegate_; |
| UserContext current_attempt_user_context_; |
| scoped_ptr<OnlineAttempt> online_attempt_; |
| @@ -65,5 +71,4 @@ class OnlineAttemptHost : public AuthAttemptStateResolver { |
| } // namespace chromeos |
| -#endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |
| - |
| +#endif // CHROMEOS_LOGIN_AUTH_ONLINE_ATTEMPT_HOST_H_ |