| 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 92b1b52160599a58f21752f2d7d3a8bbf254b6c4..39a04c61e12639feabe27b3df2845a62d252974a 100644
|
| --- a/net/http/http_auth_handler_negotiate.h
|
| +++ b/net/http/http_auth_handler_negotiate.h
|
| @@ -25,7 +25,7 @@ namespace net {
|
|
|
| class HostResolver;
|
| class SingleRequestHostResolver;
|
| -class URLSecurityManager;
|
| +class HttpAuthPreferences;
|
|
|
| // Handler for WWW-Authenticate: Negotiate protocol.
|
| //
|
| @@ -36,9 +36,6 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| public:
|
| #if defined(OS_ANDROID)
|
| typedef net::android::HttpAuthNegotiateAndroid AuthSystem;
|
| - // For Android this isn't a library, but for the Android Account type, which
|
| - // indirectly identifies the Kerberos/SPNEGO authentication app.
|
| - typedef const std::string AuthLibrary;
|
| #elif defined(OS_WIN)
|
| typedef SSPILibrary AuthLibrary;
|
| typedef HttpAuthSSPI AuthSystem;
|
| @@ -52,30 +49,17 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| Factory();
|
| ~Factory() override;
|
|
|
| - // |disable_cname_lookup()| and |set_disable_cname_lookup()| get/set whether
|
| - // the auth handlers generated by this factory should skip looking up the
|
| - // canonical DNS name of the the host that they are authenticating to when
|
| - // generating the SPN. The default value is false.
|
| - bool disable_cname_lookup() const { return disable_cname_lookup_; }
|
| - void set_disable_cname_lookup(bool disable_cname_lookup) {
|
| - disable_cname_lookup_ = disable_cname_lookup;
|
| - }
|
| -
|
| - // |use_port()| and |set_use_port()| get/set whether the auth handlers
|
| - // generated by this factory should include the port number of the server
|
| - // they are authenticating to when constructing a Kerberos SPN. The default
|
| - // value is false.
|
| - bool use_port() const { return use_port_; }
|
| - void set_use_port(bool use_port) { use_port_ = use_port; }
|
| -
|
| void set_host_resolver(HostResolver* host_resolver);
|
|
|
| +#if !defined(OS_ANDROID)
|
| // Sets the system library to use, thereby assuming ownership of
|
| // |auth_library|.
|
| - void set_library(AuthLibrary* auth_provider) {
|
| - auth_library_.reset(auth_provider);
|
| + void set_library(scoped_ptr<AuthLibrary> auth_provider) {
|
| + auth_library_ = auth_provider.Pass();
|
| }
|
| +#endif
|
|
|
| + // HttpAuthHandlerFactory overrides
|
| int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
|
| HttpAuth::Target target,
|
| const GURL& origin,
|
| @@ -85,24 +69,25 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| scoped_ptr<HttpAuthHandler>* handler) override;
|
|
|
| private:
|
| - bool disable_cname_lookup_;
|
| - bool use_port_;
|
| HostResolver* resolver_;
|
| #if defined(OS_WIN)
|
| ULONG max_token_length_;
|
| #endif
|
| bool is_unsupported_;
|
| +#if !defined(OS_ANDROID)
|
| scoped_ptr<AuthLibrary> auth_library_;
|
| +#endif
|
| };
|
|
|
| - HttpAuthHandlerNegotiate(AuthLibrary* auth_library,
|
| + HttpAuthHandlerNegotiate(
|
| +#if !defined(OS_ANDROID)
|
| + AuthLibrary* auth_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);
|
| + HttpAuthPreferences* prefs,
|
| + HostResolver* host_resolver);
|
|
|
| ~HttpAuthHandlerNegotiate() override;
|
|
|
| @@ -145,8 +130,6 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
| bool CanDelegate() const;
|
|
|
| AuthSystem auth_system_;
|
| - bool disable_cname_lookup_;
|
| - bool use_port_;
|
| HostResolver* const resolver_;
|
|
|
| // Members which are needed for DNS lookup + SPN.
|
| @@ -165,7 +148,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
|
|
|
| State next_state_;
|
|
|
| - const URLSecurityManager* url_security_manager_;
|
| + const HttpAuthPreferences* http_auth_preferences_;
|
| };
|
|
|
| } // namespace net
|
|
|