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

Unified Diff: net/http/http_auth_handler_ntlm.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_auth_handler_ntlm_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm.h
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index 828e512bfa9cfeddb00629d588196b8fd1534dd8..d0285dc9eb18e2e373d7d3ad43c237069d0c42d4 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -50,14 +50,12 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
const BoundNetLog& net_log,
scoped_ptr<HttpAuthHandler>* handler);
#if defined(NTLM_SSPI)
- // Set the SSPILibrary to use. Typically the only callers which need to
- // use this are unit tests which pass in a mocked-out version of the
- // SSPI library.
- // The caller is responsible for managing the lifetime of |*sspi_library|,
- // and the lifetime must exceed that of this Factory object and all
- // HttpAuthHandler's that this Factory object creates.
+ // Set the SSPILibrary to use. Typically the only callers which need to use
+ // this are unit tests which pass in a mocked-out version of the SSPI
+ // library. After the call |sspi_library| will be owned by this Factory and
+ // will be destroyed when the Factory is destroyed.
void set_sspi_library(SSPILibrary* sspi_library) {
- sspi_library_ = sspi_library;
+ sspi_library_.reset(sspi_library);
}
#endif // defined(NTLM_SSPI)
private:
@@ -65,7 +63,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNTLM : public HttpAuthHandler {
ULONG max_token_length_;
bool first_creation_;
bool is_unsupported_;
- SSPILibrary* sspi_library_;
+ scoped_ptr<SSPILibrary> sspi_library_;
#endif // defined(NTLM_SSPI)
};
« no previous file with comments | « no previous file | net/http/http_auth_handler_ntlm_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698