| 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/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/http/http_auth_challenge_tokenizer.h" | 10 #include "net/http/http_auth_challenge_tokenizer.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 const auto it = factory_map_.find(scheme); | 160 const auto it = factory_map_.find(scheme); |
| 161 if (it == factory_map_.end()) | 161 if (it == factory_map_.end()) |
| 162 return scoped_ptr<HttpAuthHandler>(); | 162 return scoped_ptr<HttpAuthHandler>(); |
| 163 DCHECK(it->second); | 163 DCHECK(it->second); |
| 164 return it->second->CreateAuthHandlerForScheme(scheme); | 164 return it->second->CreateAuthHandlerForScheme(scheme); |
| 165 } | 165 } |
| 166 | 166 |
| 167 scoped_ptr<HttpAuthHandler> | 167 scoped_ptr<HttpAuthHandler> |
| 168 HttpAuthHandlerRegistryFactory::CreateAndInitPreemptiveAuthHandler( | 168 HttpAuthHandlerRegistryFactory::CreateAndInitPreemptiveAuthHandler( |
| 169 HttpAuthCache::Entry* cache_entry, | 169 HttpAuthCache::Entry* cache_entry, |
| 170 const HttpAuthChallengeTokenizer& tokenizer, | |
| 171 HttpAuth::Target target, | 170 HttpAuth::Target target, |
| 172 const BoundNetLog& net_log) { | 171 const BoundNetLog& net_log) { |
| 173 std::string scheme_name = cache_entry->scheme(); | 172 std::string scheme_name = cache_entry->scheme(); |
| 174 const auto it = factory_map_.find(scheme_name); | 173 const auto it = factory_map_.find(scheme_name); |
| 175 if (it == factory_map_.end()) | 174 if (it == factory_map_.end()) |
| 176 return scoped_ptr<HttpAuthHandler>(); | 175 return scoped_ptr<HttpAuthHandler>(); |
| 177 DCHECK(it->second); | 176 DCHECK(it->second); |
| 178 return it->second->CreateAndInitPreemptiveAuthHandler(cache_entry, tokenizer, | 177 return it->second->CreateAndInitPreemptiveAuthHandler(cache_entry, target, |
| 179 target, net_log); | 178 net_log); |
| 180 } | 179 } |
| 181 | 180 |
| 182 } // namespace net | 181 } // namespace net |
| OLD | NEW |