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 5f46ab18e718eb873e401cd064054c4f087e1f19..e6679ded920cd738c152415c68872b0f42ddce24 100644 |
--- a/net/http/http_auth_handler_negotiate.h |
+++ b/net/http/http_auth_handler_negotiate.h |
@@ -72,14 +72,12 @@ class HttpAuthHandlerNegotiate : public HttpAuthHandler { |
const BoundNetLog& net_log, |
scoped_ptr<HttpAuthHandler>* handler); |
- // Set the system library to use. Typically the only callers which need to |
- // use this are unit tests which pass in a mocked-out version of the |
- // system library. |
- // The caller is responsible for managing the lifetime of |*auth_library|, |
- // and the lifetime must exceed that of this Factory object and all |
- // HttpAuthHandler's that this Factory object creates. |
+ // Set the system library to use. Typically used by unit tests which mock |
+ // out the library, and on POSIX to pass a user-specified library. |
+ // Callers beware: the passed |*auth_library| will be deleted when this |
+ // factory is destructed. |
void set_library(AuthLibrary* auth_library) { |
- auth_library_ = auth_library; |
+ auth_library_.reset(auth_library); |
cbentzel
2010/11/09 16:18:03
This is still doing the wrong thing in the Windows
Jakob Kummerow (corp)
2010/11/10 10:50:21
Done.
I went with the first suggestion, as I consi
|
} |
private: |
@@ -91,7 +89,7 @@ class HttpAuthHandlerNegotiate : public HttpAuthHandler { |
bool first_creation_; |
bool is_unsupported_; |
#endif |
- AuthLibrary* auth_library_; |
+ scoped_ptr<AuthLibrary> auth_library_; |
}; |
HttpAuthHandlerNegotiate(AuthLibrary* sspi_library, |