| Index: net/http/http_auth_handler_factory.h
|
| diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
|
| index 88ff87a7839a75cbbb2ade78e6d7d45d109885ab..31ce39bac0be8d2bf97cbeae466e84b84e5cc5d0 100644
|
| --- a/net/http/http_auth_handler_factory.h
|
| +++ b/net/http/http_auth_handler_factory.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "net/base/net_export.h"
|
| #include "net/http/http_auth.h"
|
| +#include "net/http/http_auth_cache.h"
|
| #include "net/http/url_security_manager.h"
|
|
|
| class GURL;
|
| @@ -29,11 +30,6 @@ class HttpAuthHandlerRegistryFactory;
|
| // objects that it creates.
|
| class NET_EXPORT HttpAuthHandlerFactory {
|
| public:
|
| - enum CreateReason {
|
| - CREATE_CHALLENGE, // Create a handler in response to a challenge.
|
| - CREATE_PREEMPTIVE, // Create a handler preemptively.
|
| - };
|
| -
|
| HttpAuthHandlerFactory() : url_security_manager_(NULL) {}
|
| virtual ~HttpAuthHandlerFactory() {}
|
|
|
| @@ -74,37 +70,21 @@ class NET_EXPORT HttpAuthHandlerFactory {
|
| // NOTE: This will apply to ALL |origin| values if the filters are empty.
|
| //
|
| // |*challenge| should not be reused after a call to |CreateAuthHandler()|,
|
| - virtual int CreateAuthHandler(const HttpAuthChallengeTokenizer& challenge,
|
| - HttpAuth::Target target,
|
| - const GURL& origin,
|
| - CreateReason create_reason,
|
| - int digest_nonce_count,
|
| - const BoundNetLog& net_log,
|
| - scoped_ptr<HttpAuthHandler>* handler) = 0;
|
| + // TODO(asanka): Update comment.
|
| + virtual scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme(
|
| + const std::string& scheme) = 0;
|
|
|
| // Creates an HTTP authentication handler based on the authentication
|
| // challenge string |challenge|.
|
| // This is a convenience function which creates a ChallengeTokenizer for
|
| // |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for
|
| // more details on return values.
|
| - int CreateAuthHandlerFromString(const std::string& challenge,
|
| - HttpAuth::Target target,
|
| - const GURL& origin,
|
| - const BoundNetLog& net_log,
|
| - scoped_ptr<HttpAuthHandler>* handler);
|
| -
|
| - // Creates an HTTP authentication handler based on the authentication
|
| - // challenge string |challenge|.
|
| - // This is a convenience function which creates a ChallengeTokenizer for
|
| - // |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for
|
| - // more details on return values.
|
| - int CreatePreemptiveAuthHandlerFromString(
|
| - const std::string& challenge,
|
| + // TODO(asanka): UPdate comment
|
| + virtual scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler(
|
| + HttpAuthCache::Entry* cache_entry,
|
| + const HttpAuthChallengeTokenizer& tokenizer,
|
| HttpAuth::Target target,
|
| - const GURL& origin,
|
| - int digest_nonce_count,
|
| - const BoundNetLog& net_log,
|
| - scoped_ptr<HttpAuthHandler>* handler);
|
| + const BoundNetLog& net_log) = 0;
|
|
|
| // Creates a standard HttpAuthHandlerRegistryFactory. The caller is
|
| // responsible for deleting the factory.
|
| @@ -179,6 +159,7 @@ class NET_EXPORT HttpAuthHandlerRegistryFactory
|
| //
|
| // |negotiate_disable_cname_lookup| and |negotiate_enable_port| both control
|
| // how Negotiate does SPN generation, by default these should be false.
|
| + // TODO(asanka): Update comment
|
| static HttpAuthHandlerRegistryFactory* Create(
|
| const std::vector<std::string>& supported_schemes,
|
| URLSecurityManager* security_manager,
|
| @@ -188,15 +169,17 @@ class NET_EXPORT HttpAuthHandlerRegistryFactory
|
| bool negotiate_disable_cname_lookup,
|
| bool negotiate_enable_port);
|
|
|
| + scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme(
|
| + const std::string& scheme) override;
|
| +
|
| // Create an auth handler by dispatching the CreateAuthHandler() call to the
|
| - // factory registered to handle challenge->scheme().
|
| - int CreateAuthHandler(const HttpAuthChallengeTokenizer& challenge,
|
| - HttpAuth::Target target,
|
| - const GURL& origin,
|
| - CreateReason reason,
|
| - int digest_nonce_count,
|
| - const BoundNetLog& net_log,
|
| - scoped_ptr<HttpAuthHandler>* handler) override;
|
| + // factory registered to handle challenge->scheme(). TODO(asanka): Update
|
| + // comment
|
| + scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler(
|
| + HttpAuthCache::Entry* cache_entry,
|
| + const HttpAuthChallengeTokenizer& tokenizer,
|
| + HttpAuth::Target target,
|
| + const BoundNetLog& net_log) override;
|
|
|
| private:
|
| typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap;
|
|
|