| Index: net/http/http_auth_handler_negotiate.h
|
| diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
|
| index fc596fa6db1e49ea673ed7e7b95b12d106c11381..fcf121a1e18f9e311061e3dda14024ab1bed15ae 100644
|
| --- a/net/http/http_auth_handler_negotiate.h
|
| +++ b/net/http/http_auth_handler_negotiate.h
|
| @@ -13,7 +13,9 @@
|
| #include "net/http/http_auth_handler.h"
|
| #include "net/http/http_auth_handler_factory.h"
|
|
|
| -#if defined(OS_WIN)
|
| +#if defined(OS_ANDROID)
|
| +#include "net/android/http_auth_negotiate_android.h"
|
| +#elif defined(OS_WIN)
|
| #include "net/http/http_auth_sspi_win.h"
|
| #elif defined(OS_POSIX)
|
| #include "net/http/http_auth_gssapi_posix.h"
|
| @@ -32,7 +34,9 @@ class URLSecurityManager;
|
|
|
| class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| public:
|
| -#if defined(OS_WIN)
|
| +#if defined(OS_ANDROID)
|
| + typedef net::android::HttpAuthNegotiateAndroid AuthSystem;
|
| +#elif defined(OS_WIN)
|
| typedef SSPILibrary AuthLibrary;
|
| typedef HttpAuthSSPI AuthSystem;
|
| #elif defined(OS_POSIX)
|
| @@ -63,11 +67,19 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
|
|
| void set_host_resolver(HostResolver* host_resolver);
|
|
|
| +#if defined(OS_ANDROID)
|
| + // Sets the account type to use for authentication
|
| + void set_account_type(const std::string& account_type) {
|
| + account_type_ = account_type;
|
| + }
|
| +#endif
|
| +#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
|
| // Sets the system library to use, thereby assuming ownership of
|
| // |auth_library|.
|
| void set_library(AuthLibrary* auth_library) {
|
| auth_library_.reset(auth_library);
|
| }
|
| +#endif
|
|
|
| int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
|
| HttpAuth::Target target,
|
| @@ -86,17 +98,28 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| bool first_creation_;
|
| #endif
|
| bool is_unsupported_;
|
| +#if defined(OS_ANDROID)
|
| + std::string account_type_;
|
| +#endif
|
| +#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
|
| scoped_ptr<AuthLibrary> auth_library_;
|
| +#endif
|
| };
|
|
|
| - HttpAuthHandlerNegotiate(AuthLibrary* sspi_library,
|
| + HttpAuthHandlerNegotiate(
|
| +#if defined(OS_ANDROID)
|
| + std::string account_type,
|
| +#endif
|
| +#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
|
| + AuthLibrary* sspi_library,
|
| +#endif
|
| #if defined(OS_WIN)
|
| - ULONG max_token_length,
|
| + ULONG max_token_length,
|
| #endif
|
| - URLSecurityManager* url_security_manager,
|
| - HostResolver* host_resolver,
|
| - bool disable_cname_lookup,
|
| - bool use_port);
|
| + URLSecurityManager* url_security_manager,
|
| + HostResolver* host_resolver,
|
| + bool disable_cname_lookup,
|
| + bool use_port);
|
|
|
| ~HttpAuthHandlerNegotiate() override;
|
|
|
| @@ -138,6 +161,8 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| int DoGenerateAuthTokenComplete(int rv);
|
| bool CanDelegate() const;
|
|
|
| + bool ParseFirstChallenge(HttpAuthChallengeTokenizer* tok);
|
| +
|
| AuthSystem auth_system_;
|
| bool disable_cname_lookup_;
|
| bool use_port_;
|
|
|