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

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

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/disk_cache_based_quic_server_info_unittest.cc ('k') | net/http/http_cache.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_negotiate.h" 5 #include "net/http/http_auth_handler_negotiate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/profiler/scoped_tracker.h"
10 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
11 #include "net/base/address_family.h" 12 #include "net/base/address_family.h"
12 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
13 #include "net/dns/host_resolver.h" 14 #include "net/dns/host_resolver.h"
14 #include "net/dns/single_request_host_resolver.h" 15 #include "net/dns/single_request_host_resolver.h"
15 #include "net/http/http_auth_filter.h" 16 #include "net/http/http_auth_filter.h"
16 #include "net/http/url_security_manager.h" 17 #include "net/http/url_security_manager.h"
17 18
18 namespace net { 19 namespace net {
19 20
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 226 }
226 next_state_ = STATE_RESOLVE_CANONICAL_NAME; 227 next_state_ = STATE_RESOLVE_CANONICAL_NAME;
227 } 228 }
228 int rv = DoLoop(OK); 229 int rv = DoLoop(OK);
229 if (rv == ERR_IO_PENDING) 230 if (rv == ERR_IO_PENDING)
230 callback_ = callback; 231 callback_ = callback;
231 return rv; 232 return rv;
232 } 233 }
233 234
234 void HttpAuthHandlerNegotiate::OnIOComplete(int result) { 235 void HttpAuthHandlerNegotiate::OnIOComplete(int result) {
236 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed.
237 tracked_objects::ScopedTracker tracking_profile(
238 FROM_HERE_WITH_EXPLICIT_FUNCTION(
239 "436634 HttpAuthHandlerNegotiate::OnIOComplete"));
240
235 int rv = DoLoop(result); 241 int rv = DoLoop(result);
236 if (rv != ERR_IO_PENDING) 242 if (rv != ERR_IO_PENDING)
237 DoCallback(rv); 243 DoCallback(rv);
238 } 244 }
239 245
240 void HttpAuthHandlerNegotiate::DoCallback(int rv) { 246 void HttpAuthHandlerNegotiate::DoCallback(int rv) {
241 DCHECK(rv != ERR_IO_PENDING); 247 DCHECK(rv != ERR_IO_PENDING);
242 DCHECK(!callback_.is_null()); 248 DCHECK(!callback_.is_null());
243 CompletionCallback callback = callback_; 249 CompletionCallback callback = callback_;
244 callback_.Reset(); 250 callback_.Reset();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 bool HttpAuthHandlerNegotiate::CanDelegate() const { 334 bool HttpAuthHandlerNegotiate::CanDelegate() const {
329 // TODO(cbentzel): Should delegation be allowed on proxies? 335 // TODO(cbentzel): Should delegation be allowed on proxies?
330 if (target_ == HttpAuth::AUTH_PROXY) 336 if (target_ == HttpAuth::AUTH_PROXY)
331 return false; 337 return false;
332 if (!url_security_manager_) 338 if (!url_security_manager_)
333 return false; 339 return false;
334 return url_security_manager_->CanDelegate(origin_); 340 return url_security_manager_->CanDelegate(origin_);
335 } 341 }
336 342
337 } // namespace net 343 } // namespace net
OLDNEW
« no previous file with comments | « net/http/disk_cache_based_quic_server_info_unittest.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698