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

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

Issue 125107: * Move the global "DnsResolutionObserver" code depended on by DNS prefetcher,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address jar's comments Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | net/net.gyp » ('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) 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 host = proxy_server.HostNoBrackets(); 563 host = proxy_server.HostNoBrackets();
564 port = proxy_server.port(); 564 port = proxy_server.port();
565 } else { 565 } else {
566 host = request_->url.HostNoBrackets(); 566 host = request_->url.HostNoBrackets();
567 port = request_->url.EffectiveIntPort(); 567 port = request_->url.EffectiveIntPort();
568 } 568 }
569 if (!using_proxy_) 569 if (!using_proxy_)
570 connection_group.append(request_->url.GetOrigin().spec()); 570 connection_group.append(request_->url.GetOrigin().spec());
571 571
572 DCHECK(!connection_group.empty()); 572 DCHECK(!connection_group.empty());
573 int rv = connection_.Init(connection_group, host, port, request_->priority, 573
574 HostResolver::RequestInfo resolve_info(host, port);
575
576 // The referrer is used by the DNS prefetch system to corellate resolutions
577 // with the page that triggered them. It doesn't impact the actual addresses
578 // that we resolve to.
579 resolve_info.set_referrer(request_->referrer);
580
581 // TODO(eroman): Enable this!
582 // Needs some unit-tests before turning on.
583 // http://crbug.com/13163
584 #if 0
585 // If the user is refreshing the page, bypass the host cache.
586 if (request_->load_flags & LOAD_BYPASS_CACHE ||
587 request_->load_flags & LOAD_DISABLE_CACHE) {
588 resolve_info.allow_cached_response = false;
589 }
590 #endif
591
592 int rv = connection_.Init(connection_group, resolve_info, request_->priority,
574 &io_callback_); 593 &io_callback_);
575 return rv; 594 return rv;
576 } 595 }
577 596
578 int HttpNetworkTransaction::DoInitConnectionComplete(int result) { 597 int HttpNetworkTransaction::DoInitConnectionComplete(int result) {
579 if (result < 0) 598 if (result < 0)
580 return ReconsiderProxyAfterError(result); 599 return ReconsiderProxyAfterError(result);
581 600
582 DCHECK(connection_.is_initialized()); 601 DCHECK(connection_.is_initialized());
583 602
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 host_and_port = proxy_info_.proxy_server().host_and_port(); 1668 host_and_port = proxy_info_.proxy_server().host_and_port();
1650 } else { 1669 } else {
1651 DCHECK(target == HttpAuth::AUTH_SERVER); 1670 DCHECK(target == HttpAuth::AUTH_SERVER);
1652 host_and_port = GetHostAndPort(request_->url); 1671 host_and_port = GetHostAndPort(request_->url);
1653 } 1672 }
1654 auth_info->host_and_port = ASCIIToWide(host_and_port); 1673 auth_info->host_and_port = ASCIIToWide(host_and_port);
1655 response_.auth_challenge = auth_info; 1674 response_.auth_challenge = auth_info;
1656 } 1675 }
1657 1676
1658 } // namespace net 1677 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698