Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 void set_host_resolver(HostResolver* host_resolver); | 65 void set_host_resolver(HostResolver* host_resolver); |
| 66 | 66 |
| 67 virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge, | 67 virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge, |
| 68 HttpAuth::Target target, | 68 HttpAuth::Target target, |
| 69 const GURL& origin, | 69 const GURL& origin, |
| 70 CreateReason reason, | 70 CreateReason reason, |
| 71 int digest_nonce_count, | 71 int digest_nonce_count, |
| 72 const BoundNetLog& net_log, | 72 const BoundNetLog& net_log, |
| 73 scoped_ptr<HttpAuthHandler>* handler); | 73 scoped_ptr<HttpAuthHandler>* handler); |
| 74 | 74 |
| 75 // Set the system library to use. Typically the only callers which need to | 75 // Set the system library to use. Typically used by unit tests which mock |
| 76 // use this are unit tests which pass in a mocked-out version of the | 76 // out the library, and on POSIX to pass a user-specified library. |
| 77 // system library. | 77 // Callers beware: the passed |*auth_library| will be deleted when this |
| 78 // The caller is responsible for managing the lifetime of |*auth_library|, | 78 // factory is destructed. |
| 79 // and the lifetime must exceed that of this Factory object and all | |
| 80 // HttpAuthHandler's that this Factory object creates. | |
| 81 void set_library(AuthLibrary* auth_library) { | 79 void set_library(AuthLibrary* auth_library) { |
| 82 auth_library_ = auth_library; | 80 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
| |
| 83 } | 81 } |
| 84 | 82 |
| 85 private: | 83 private: |
| 86 bool disable_cname_lookup_; | 84 bool disable_cname_lookup_; |
| 87 bool use_port_; | 85 bool use_port_; |
| 88 HostResolver* resolver_; | 86 HostResolver* resolver_; |
| 89 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
| 90 ULONG max_token_length_; | 88 ULONG max_token_length_; |
| 91 bool first_creation_; | 89 bool first_creation_; |
| 92 bool is_unsupported_; | 90 bool is_unsupported_; |
| 93 #endif | 91 #endif |
| 94 AuthLibrary* auth_library_; | 92 scoped_ptr<AuthLibrary> auth_library_; |
| 95 }; | 93 }; |
| 96 | 94 |
| 97 HttpAuthHandlerNegotiate(AuthLibrary* sspi_library, | 95 HttpAuthHandlerNegotiate(AuthLibrary* sspi_library, |
| 98 #if defined(OS_WIN) | 96 #if defined(OS_WIN) |
| 99 ULONG max_token_length, | 97 ULONG max_token_length, |
| 100 #endif | 98 #endif |
| 101 URLSecurityManager* url_security_manager, | 99 URLSecurityManager* url_security_manager, |
| 102 HostResolver* host_resolver, | 100 HostResolver* host_resolver, |
| 103 bool disable_cname_lookup, | 101 bool disable_cname_lookup, |
| 104 bool use_port); | 102 bool use_port); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 std::string* auth_token_; | 164 std::string* auth_token_; |
| 167 | 165 |
| 168 State next_state_; | 166 State next_state_; |
| 169 | 167 |
| 170 const URLSecurityManager* url_security_manager_; | 168 const URLSecurityManager* url_security_manager_; |
| 171 }; | 169 }; |
| 172 | 170 |
| 173 } // namespace net | 171 } // namespace net |
| 174 | 172 |
| 175 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 173 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| OLD | NEW |