Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: net/http/http_auth_handler_factory.cc

Issue 1391053002: [net/http auth] Make HttpAuthHandler challenge handling asynchronous. Base URL: https://chromium.googlesource.com/chromium/src.git@auth-handler-init-split
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_auth_handler_factory.h ('k') | net/http/http_auth_handler_factory_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_factory.h ('k') | net/http/http_auth_handler_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698