OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/field_trial.h" | 9 #include "base/field_trial.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 port = request_->url.EffectiveIntPort(); | 585 port = request_->url.EffectiveIntPort(); |
586 } | 586 } |
587 | 587 |
588 // For a connection via HTTP proxy not using CONNECT, the connection | 588 // For a connection via HTTP proxy not using CONNECT, the connection |
589 // is to the proxy server only. For all other cases | 589 // is to the proxy server only. For all other cases |
590 // (direct, HTTP proxy CONNECT, SOCKS), the connection is upto the | 590 // (direct, HTTP proxy CONNECT, SOCKS), the connection is upto the |
591 // url endpoint. Hence we append the url data into the connection_group. | 591 // url endpoint. Hence we append the url data into the connection_group. |
592 if (proxy_mode_ != kHTTPProxy) | 592 if (proxy_mode_ != kHTTPProxy) |
593 connection_group.append(request_->url.GetOrigin().spec()); | 593 connection_group.append(request_->url.GetOrigin().spec()); |
594 | 594 |
595 DCHECK(!connection_group.empty()); | 595 // TODO(willchan): Downgrade this back to a DCHECK after closing |
| 596 // http://crbug.com/15374. |
| 597 CHECK(!connection_group.empty()) << "URL: " << request_->url.GetOrigin() |
| 598 << ", Host: " << host |
| 599 << ", Port: " << port; |
596 | 600 |
597 HostResolver::RequestInfo resolve_info(host, port); | 601 HostResolver::RequestInfo resolve_info(host, port); |
598 | 602 |
599 // The referrer is used by the DNS prefetch system to corellate resolutions | 603 // The referrer is used by the DNS prefetch system to corellate resolutions |
600 // with the page that triggered them. It doesn't impact the actual addresses | 604 // with the page that triggered them. It doesn't impact the actual addresses |
601 // that we resolve to. | 605 // that we resolve to. |
602 resolve_info.set_referrer(request_->referrer); | 606 resolve_info.set_referrer(request_->referrer); |
603 | 607 |
604 // If the user is refreshing the page, bypass the host cache. | 608 // If the user is refreshing the page, bypass the host cache. |
605 if (request_->load_flags & LOAD_BYPASS_CACHE || | 609 if (request_->load_flags & LOAD_BYPASS_CACHE || |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 host_and_port = proxy_info_.proxy_server().host_and_port(); | 1769 host_and_port = proxy_info_.proxy_server().host_and_port(); |
1766 } else { | 1770 } else { |
1767 DCHECK(target == HttpAuth::AUTH_SERVER); | 1771 DCHECK(target == HttpAuth::AUTH_SERVER); |
1768 host_and_port = GetHostAndPort(request_->url); | 1772 host_and_port = GetHostAndPort(request_->url); |
1769 } | 1773 } |
1770 auth_info->host_and_port = ASCIIToWide(host_and_port); | 1774 auth_info->host_and_port = ASCIIToWide(host_and_port); |
1771 response_.auth_challenge = auth_info; | 1775 response_.auth_challenge = auth_info; |
1772 } | 1776 } |
1773 | 1777 |
1774 } // namespace net | 1778 } // namespace net |
OLD | NEW |