diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 14:17:14 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 14:17:14 +0000 |
commit | 36c8e5f7523eb31c11fce92246cdaca4e7af4f36 (patch) | |
tree | 117a4786075700fb0b86b843304964c694adf533 /net/http/http_auth_handler_factory.cc | |
parent | 7ec0cb21f022b28c20e6e44e5f38f9ed6bc13a16 (diff) | |
download | chromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.zip chromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.tar.gz chromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.tar.bz2 |
HttpAuthHandler's are no longer refcounted.
Since HttpAuthHandler objects are no longer contained inside of the
HttpAuthCache, the lifetime of the handlers is more clearly defined.
TEST=net_unittests (including some changes)
BUG=42222
Review URL: http://codereview.chromium.org/2635004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_factory.cc')
-rw-r--r-- | net/http/http_auth_handler_factory.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc index e6d697f..c2d011b 100644 --- a/net/http/http_auth_handler_factory.cc +++ b/net/http/http_auth_handler_factory.cc @@ -20,7 +20,7 @@ int HttpAuthHandlerFactory::CreateAuthHandlerFromString( HttpAuth::Target target, const GURL& origin, const BoundNetLog& net_log, - scoped_refptr<HttpAuthHandler>* handler) { + scoped_ptr<HttpAuthHandler>* handler) { HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end()); return CreateAuthHandler(&props, target, origin, CREATE_CHALLENGE, 1, net_log, handler); @@ -32,7 +32,7 @@ int HttpAuthHandlerFactory::CreatePreemptiveAuthHandlerFromString( const GURL& origin, int digest_nonce_count, const BoundNetLog& net_log, - scoped_refptr<HttpAuthHandler>* handler) { + scoped_ptr<HttpAuthHandler>* handler) { HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end()); return CreateAuthHandler(&props, target, origin, CREATE_PREEMPTIVE, digest_nonce_count, net_log, handler); @@ -90,15 +90,15 @@ int HttpAuthHandlerRegistryFactory::CreateAuthHandler( CreateReason reason, int digest_nonce_count, const BoundNetLog& net_log, - scoped_refptr<HttpAuthHandler>* handler) { + scoped_ptr<HttpAuthHandler>* handler) { if (!challenge->valid()) { - *handler = NULL; + handler->reset(); return ERR_INVALID_RESPONSE; } std::string lower_scheme = StringToLowerASCII(challenge->scheme()); FactoryMap::iterator it = factory_map_.find(lower_scheme); if (it == factory_map_.end()) { - *handler = NULL; + handler->reset(); return ERR_UNSUPPORTED_AUTH_SCHEME; } DCHECK(it->second); |