| OLD | NEW |
| 1 // Copyright (c) 2011 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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // ignored on Android and Windows. | 174 // ignored on Android and Windows. |
| 175 // | 175 // |
| 176 // |auth_android_negotiate_account_type| is an Android account type, used to | 176 // |auth_android_negotiate_account_type| is an Android account type, used to |
| 177 // find the appropriate authenticator service on Android. It is ignored on | 177 // find the appropriate authenticator service on Android. It is ignored on |
| 178 // non-Android platforms. | 178 // non-Android platforms. |
| 179 // | 179 // |
| 180 // |negotiate_disable_cname_lookup| and |negotiate_enable_port| both control | 180 // |negotiate_disable_cname_lookup| and |negotiate_enable_port| both control |
| 181 // how Negotiate does SPN generation, by default these should be false. | 181 // how Negotiate does SPN generation, by default these should be false. |
| 182 static HttpAuthHandlerRegistryFactory* Create( | 182 static HttpAuthHandlerRegistryFactory* Create( |
| 183 const std::vector<std::string>& supported_schemes, | 183 const std::vector<std::string>& supported_schemes, |
| 184 URLSecurityManager* security_manager, | |
| 185 HostResolver* host_resolver, | 184 HostResolver* host_resolver, |
| 186 const std::string& gssapi_library_name, | 185 const std::string& gssapi_library_name); |
| 187 const std::string& auth_android_negotiate_account_type, | 186 |
| 188 bool negotiate_disable_cname_lookup, | 187 void SetSecurityManager(URLSecurityManager* security_manager); |
| 189 bool negotiate_enable_port); | 188 void SetAndroidAuthNegotiateAccountType(const std::string& account_type); |
| 189 void SetNegotiateDisableCnameLookup(bool negotiate_disable_cname_lookup); |
| 190 void SetNegotiateEnablePort(bool negotiate_enable_port); |
| 190 | 191 |
| 191 // Creates an auth handler by dispatching out to the registered factories | 192 // Creates an auth handler by dispatching out to the registered factories |
| 192 // based on the first token in |challenge|. | 193 // based on the first token in |challenge|. |
| 193 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, | 194 int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge, |
| 194 HttpAuth::Target target, | 195 HttpAuth::Target target, |
| 195 const GURL& origin, | 196 const GURL& origin, |
| 196 CreateReason reason, | 197 CreateReason reason, |
| 197 int digest_nonce_count, | 198 int digest_nonce_count, |
| 198 const BoundNetLog& net_log, | 199 const BoundNetLog& net_log, |
| 199 scoped_ptr<HttpAuthHandler>* handler) override; | 200 scoped_ptr<HttpAuthHandler>* handler) override; |
| 200 | 201 |
| 201 private: | 202 private: |
| 202 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; | 203 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; |
| 203 | 204 |
| 204 FactoryMap factory_map_; | 205 FactoryMap factory_map_; |
| 205 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); | 206 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); |
| 206 }; | 207 }; |
| 207 | 208 |
| 208 } // namespace net | 209 } // namespace net |
| 209 | 210 |
| 210 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ | 211 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ |
| OLD | NEW |