| 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.
|
|
|