| 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 #include "net/http/http_auth_handler_factory.h" | 5 #include "net/http/http_auth_handler_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // static | 139 // static |
| 140 std::unique_ptr<HttpAuthHandlerRegistryFactory> | 140 std::unique_ptr<HttpAuthHandlerRegistryFactory> |
| 141 HttpAuthHandlerFactory::CreateDefault(HostResolver* host_resolver) { | 141 HttpAuthHandlerFactory::CreateDefault(HostResolver* host_resolver) { |
| 142 std::vector<std::string> auth_types(std::begin(kDefaultAuthSchemes), | 142 std::vector<std::string> auth_types(std::begin(kDefaultAuthSchemes), |
| 143 std::end(kDefaultAuthSchemes)); | 143 std::end(kDefaultAuthSchemes)); |
| 144 HttpAuthPreferences prefs(auth_types | 144 HttpAuthPreferences prefs(auth_types |
| 145 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 145 #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| 146 , | 146 , |
| 147 std::string() | 147 std::string() |
| 148 #endif | 148 #endif |
| 149 ); | 149 #if defined(OS_CHROMEOS) |
| 150 , |
| 151 true |
| 152 #endif |
| 153 ); |
| 150 return CreateAuthHandlerRegistryFactory(prefs, host_resolver); | 154 return CreateAuthHandlerRegistryFactory(prefs, host_resolver); |
| 151 } | 155 } |
| 152 | 156 |
| 153 // static | 157 // static |
| 154 std::unique_ptr<HttpAuthHandlerRegistryFactory> | 158 std::unique_ptr<HttpAuthHandlerRegistryFactory> |
| 155 HttpAuthHandlerRegistryFactory::Create(const HttpAuthPreferences* prefs, | 159 HttpAuthHandlerRegistryFactory::Create(const HttpAuthPreferences* prefs, |
| 156 HostResolver* host_resolver) { | 160 HostResolver* host_resolver) { |
| 157 std::unique_ptr<HttpAuthHandlerRegistryFactory> registry_factory( | 161 std::unique_ptr<HttpAuthHandlerRegistryFactory> registry_factory( |
| 158 CreateAuthHandlerRegistryFactory(*prefs, host_resolver)); | 162 CreateAuthHandlerRegistryFactory(*prefs, host_resolver)); |
| 159 registry_factory->set_http_auth_preferences(prefs); | 163 registry_factory->set_http_auth_preferences(prefs); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 183 handler->reset(); | 187 handler->reset(); |
| 184 return ERR_UNSUPPORTED_AUTH_SCHEME; | 188 return ERR_UNSUPPORTED_AUTH_SCHEME; |
| 185 } | 189 } |
| 186 DCHECK(it->second); | 190 DCHECK(it->second); |
| 187 return it->second->CreateAuthHandler(challenge, target, ssl_info, origin, | 191 return it->second->CreateAuthHandler(challenge, target, ssl_info, origin, |
| 188 reason, digest_nonce_count, net_log, | 192 reason, digest_nonce_count, net_log, |
| 189 handler); | 193 handler); |
| 190 } | 194 } |
| 191 | 195 |
| 192 } // namespace net | 196 } // namespace net |
| OLD | NEW |