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

Unified Diff: chrome/browser/chromeos/proxy_config_service_impl.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 | « no previous file | net/proxy/proxy_config.h » ('j') | net/proxy/proxy_resolver_v8.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/proxy_config_service_impl.cc
diff --git a/chrome/browser/chromeos/proxy_config_service_impl.cc b/chrome/browser/chromeos/proxy_config_service_impl.cc
index e36dcf9b4b1b1e794d5ced628b8d1a294ee6285b..70f74f4015fd75d5e433b23cd3e7cd3cf7bd1253 100644
--- a/chrome/browser/chromeos/proxy_config_service_impl.cc
+++ b/chrome/browser/chromeos/proxy_config_service_impl.cc
@@ -161,7 +161,7 @@ bool ProxyConfigServiceImpl::IgnoreProxy(const PrefService* profile_prefs,
void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
- const FavoriteState* network = handler->DefaultFavoriteNetwork();
+ const FavoriteState* favorite = handler->DefaultFavoriteNetwork();
// Get prefs proxy config if available.
net::ProxyConfig pref_config;
@@ -172,20 +172,20 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
net::ProxyConfigService::ConfigAvailability network_availability =
net::ProxyConfigService::CONFIG_UNSET;
bool ignore_proxy = true;
- if (network) {
+ if (favorite) {
::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE;
const bool network_proxy_configured = chromeos::GetProxyConfig(
- prefs(), local_state_prefs_, *network, &network_config, &onc_source);
+ prefs(), local_state_prefs_, *favorite, &network_config, &onc_source);
ignore_proxy =
- IgnoreProxy(profile_prefs_, network->profile_path(), onc_source);
+ IgnoreProxy(profile_prefs_, favorite->profile_path(), onc_source);
- // If network is shared but use-shared-proxies is off, use direct mode.
+ // If favorite is shared but use-shared-proxies is off, use direct mode.
if (ignore_proxy) {
network_config = net::ProxyConfig();
network_availability = net::ProxyConfigService::CONFIG_VALID;
} else if (network_proxy_configured) {
// Network is private or shared with user using shared proxies.
- VLOG(1) << this << ": using proxy of network " << network->path();
+ VLOG(1) << this << ": using proxy of network " << favorite->path();
network_availability = net::ProxyConfigService::CONFIG_VALID;
}
}
@@ -196,6 +196,11 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
GetEffectiveProxyConfig(pref_state, pref_config,
network_availability, network_config, ignore_proxy,
&effective_config_state, &effective_config);
+ if (favorite) {
+ const NetworkState* network = handler->GetNetworkState(favorite->path());
+ if (network)
+ effective_config.set_my_ip_address(network->ip_address());
+ }
// Activate effective proxy and store into |active_config_|.
// If last update didn't complete, we definitely update now.
« no previous file with comments | « no previous file | net/proxy/proxy_config.h » ('j') | net/proxy/proxy_resolver_v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698