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

Unified Diff: net/proxy/proxy_resolver_v8_tracing.cc

Issue 238433003: Provide Shill IP Address to myIpAddress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Non proxy specific implementation Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/host_resolver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_v8_tracing.cc
diff --git a/net/proxy/proxy_resolver_v8_tracing.cc b/net/proxy/proxy_resolver_v8_tracing.cc
index f772dc1271f943e4d28624b212c11aa64ea92917..9fc3a2e2e5cade1233cd30c05b012b529010b679 100644
--- a/net/proxy/proxy_resolver_v8_tracing.cc
+++ b/net/proxy/proxy_resolver_v8_tracing.cc
@@ -927,6 +927,17 @@ bool ProxyResolverV8Tracing::Job::GetDnsFromLocalCache(
bool* return_value) {
CheckIsOnWorkerThread();
+ if (op == MY_IP_ADDRESS || op == MY_IP_ADDRESS_EX) {
eroman 2014/04/21 22:54:47 There is a difference between MY_IP_ADDRESS and MY
stevenjb 2014/04/22 22:32:56 Currently we only have ipv4 address available. I w
+ // If a system (e.g. Chrome OS) has specified an explicit IP address to
+ // use, return that.
+ std::string my_ip_address = host_resolver()->my_ip_address();
eroman 2014/04/21 22:54:47 This is not correct. The HostResolver should only
stevenjb 2014/04/22 22:32:56 Ah, you are right. I will move this to DoDnsOperat
+ if (!my_ip_address.empty()) {
+ *output = my_ip_address;
+ *return_value = true;
+ return true;
+ }
+ }
+
DnsCache::const_iterator it = dns_cache_.find(MakeDnsCacheKey(host, op));
if (it == dns_cache_.end())
return false;
« no previous file with comments | « net/dns/host_resolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698