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

Unified Diff: net/proxy/proxy_resolver_v8.cc

Issue 238433003: Provide Shill IP Address to myIpAddress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/proxy/proxy_resolver.h ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_v8.cc
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index 9c9f421b91051ef0c739aa360490821963407ffb..6d05e4892befff9fd60f23f880060d2bc58a1963 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -640,10 +640,15 @@ class ProxyResolverV8::Context {
case JSBindings::DNS_RESOLVE_EX:
args.GetReturnValue().SetEmptyString();
return;
- case JSBindings::MY_IP_ADDRESS:
- args.GetReturnValue().Set(
- ASCIILiteralToV8String(args.GetIsolate(), "127.0.0.1"));
+ case JSBindings::MY_IP_ADDRESS: {
+ std::string default_ip_address =
+ context->parent_->default_my_ip_address();
+ if (default_ip_address.empty())
+ default_ip_address = "127.0.0.1";
+ args.GetReturnValue().Set(ASCIILiteralToV8String(
eroman 2014/04/16 02:12:52 This is not correct. Note that this is the error h
+ args.GetIsolate(), default_ip_address.c_str()));
return;
+ }
case JSBindings::MY_IP_ADDRESS_EX:
args.GetReturnValue().SetEmptyString();
return;
« no previous file with comments | « net/proxy/proxy_resolver.h ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698