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

Side by Side Diff: net/proxy/proxy_resolver_v8_tracing.cc

Issue 355953002: Flag myIpAddress requests for chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: flags -> is_my_ip_address Created 6 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
« net/dns/host_resolver.h ('K') | « net/dns/host_resolver.cc ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/proxy/proxy_resolver_v8_tracing.h" 5 #include "net/proxy/proxy_resolver_v8_tracing.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 966
967 // static 967 // static
968 HostResolver::RequestInfo ProxyResolverV8Tracing::Job::MakeDnsRequestInfo( 968 HostResolver::RequestInfo ProxyResolverV8Tracing::Job::MakeDnsRequestInfo(
969 const std::string& host, ResolveDnsOperation op) { 969 const std::string& host, ResolveDnsOperation op) {
970 HostPortPair host_port = HostPortPair(host, 80); 970 HostPortPair host_port = HostPortPair(host, 80);
971 if (op == MY_IP_ADDRESS || op == MY_IP_ADDRESS_EX) { 971 if (op == MY_IP_ADDRESS || op == MY_IP_ADDRESS_EX) {
972 host_port.set_host(GetHostName()); 972 host_port.set_host(GetHostName());
973 } 973 }
974 974
975 HostResolver::RequestInfo info(host_port); 975 HostResolver::RequestInfo info(host_port);
976 976 // Flag myIpAddress requests.
977 if (op == MY_IP_ADDRESS || op == MY_IP_ADDRESS_EX) {
978 info.set_is_my_ip_address(true);
979 }
977 // The non-ex flavors are limited to IPv4 results. 980 // The non-ex flavors are limited to IPv4 results.
978 if (op == MY_IP_ADDRESS || op == DNS_RESOLVE) { 981 if (op == MY_IP_ADDRESS || op == DNS_RESOLVE) {
979 info.set_address_family(ADDRESS_FAMILY_IPV4); 982 info.set_address_family(ADDRESS_FAMILY_IPV4);
980 } 983 }
981 984
982 return info; 985 return info;
983 } 986 }
984 987
985 std::string ProxyResolverV8Tracing::Job::MakeDnsCacheKey( 988 std::string ProxyResolverV8Tracing::Job::MakeDnsCacheKey(
986 const std::string& host, ResolveDnsOperation op) { 989 const std::string& host, ResolveDnsOperation op) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 DCHECK(!set_pac_script_job_.get()); 1167 DCHECK(!set_pac_script_job_.get());
1165 CHECK_EQ(0, num_outstanding_callbacks_); 1168 CHECK_EQ(0, num_outstanding_callbacks_);
1166 1169
1167 set_pac_script_job_ = new Job(this); 1170 set_pac_script_job_ = new Job(this);
1168 set_pac_script_job_->StartSetPacScript(script_data, callback); 1171 set_pac_script_job_->StartSetPacScript(script_data, callback);
1169 1172
1170 return ERR_IO_PENDING; 1173 return ERR_IO_PENDING;
1171 } 1174 }
1172 1175
1173 } // namespace net 1176 } // namespace net
OLDNEW
« net/dns/host_resolver.h ('K') | « net/dns/host_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698