Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: net/http/http_auth_handler_ntlm_win.cc

Issue 7864005: Don't leak SSPILibraryDefault objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and update copyright header Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | tools/valgrind/drmemory/suppressions.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See "SSPI Sample Application" at 5 // See "SSPI Sample Application" at
6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx 6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx
7 // and "NTLM Security Support Provider" at 7 // and "NTLM Security Support Provider" at
8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx. 8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx.
9 9
10 #include "net/http/http_auth_handler_ntlm.h" 10 #include "net/http/http_auth_handler_ntlm.h"
11 11
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 HttpAuth::ChallengeTokenizer* challenge, 56 HttpAuth::ChallengeTokenizer* challenge,
57 HttpAuth::Target target, 57 HttpAuth::Target target,
58 const GURL& origin, 58 const GURL& origin,
59 CreateReason reason, 59 CreateReason reason,
60 int digest_nonce_count, 60 int digest_nonce_count,
61 const BoundNetLog& net_log, 61 const BoundNetLog& net_log,
62 scoped_ptr<HttpAuthHandler>* handler) { 62 scoped_ptr<HttpAuthHandler>* handler) {
63 if (is_unsupported_ || reason == CREATE_PREEMPTIVE) 63 if (is_unsupported_ || reason == CREATE_PREEMPTIVE)
64 return ERR_UNSUPPORTED_AUTH_SCHEME; 64 return ERR_UNSUPPORTED_AUTH_SCHEME;
65 if (max_token_length_ == 0) { 65 if (max_token_length_ == 0) {
66 int rv = DetermineMaxTokenLength(sspi_library_, NTLMSP_NAME, 66 int rv = DetermineMaxTokenLength(sspi_library_.get(), NTLMSP_NAME,
67 &max_token_length_); 67 &max_token_length_);
68 if (rv == ERR_UNSUPPORTED_AUTH_SCHEME) 68 if (rv == ERR_UNSUPPORTED_AUTH_SCHEME)
69 is_unsupported_ = true; 69 is_unsupported_ = true;
70 if (rv != OK) 70 if (rv != OK)
71 return rv; 71 return rv;
72 } 72 }
73 // TODO(cbentzel): Move towards model of parsing in the factory 73 // TODO(cbentzel): Move towards model of parsing in the factory
74 // method and only constructing when valid. 74 // method and only constructing when valid.
75 scoped_ptr<HttpAuthHandler> tmp_handler( 75 scoped_ptr<HttpAuthHandler> tmp_handler(
76 new HttpAuthHandlerNTLM(sspi_library_, max_token_length_, 76 new HttpAuthHandlerNTLM(sspi_library_.get(), max_token_length_,
77 url_security_manager())); 77 url_security_manager()));
78 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log)) 78 if (!tmp_handler->InitFromChallenge(challenge, target, origin, net_log))
79 return ERR_INVALID_RESPONSE; 79 return ERR_INVALID_RESPONSE;
80 handler->swap(tmp_handler); 80 handler->swap(tmp_handler);
81 return OK; 81 return OK;
82 } 82 }
83 83
84 } // namespace net 84 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_ntlm.h ('k') | tools/valgrind/drmemory/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698