Index: chrome/browser/ui/webui/chromeos/login/network_state_informer.cc |
diff --git a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc |
index 34d62729a1cbc27f5f1416d41c7d21f250591cac..db87d734263569724d9b8a842a81dea8ad4fb981 100644 |
--- a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc |
+++ b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc |
@@ -8,8 +8,11 @@ |
#include "base/logging.h" |
#include "base/message_loop.h" |
#include "chrome/browser/chromeos/cros/cros_library.h" |
-#include "chrome/browser/chromeos/proxy_config_service_impl.h" |
+#include "chrome/browser/prefs/proxy_config_dictionary.h" |
+#include "chrome/browser/prefs/proxy_prefs.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chromeos/network/network_state.h" |
+#include "chromeos/network/network_state_handler.h" |
#include "net/proxy/proxy_config.h" |
namespace { |
@@ -207,18 +210,13 @@ NetworkStateInformer::State NetworkStateInformer::GetNetworkState( |
bool NetworkStateInformer::IsProxyConfigured(const Network* network) { |
DCHECK(network); |
- ProxyStateMap::iterator it = proxy_state_map_.find(network->unique_id()); |
- if (it != proxy_state_map_.end() && |
- it->second.proxy_config == network->proxy_config()) { |
- return it->second.configured; |
- } |
- net::ProxyConfig proxy_config; |
- if (!ProxyConfigServiceImpl::ParseProxyConfig(network, &proxy_config)) |
- return false; |
- bool configured = !proxy_config.proxy_rules().empty(); |
- proxy_state_map_[network->unique_id()] = |
- ProxyState(network->proxy_config(), configured); |
- return configured; |
+ const NetworkState* network_state = |
+ NetworkStateHandler::Get()->GetNetworkState(network->service_path()); |
+ DCHECK(network_state); |
stevenjb
2013/05/15 17:44:14
nit: Highly unlikely but not impossible, e.g. if t
pneubeck (no reviews)
2013/05/15 20:24:48
This is still waiting on Gaurav's commit. I should
|
+ |
+ ProxyConfigDictionary proxy_dict(&network_state->proxy_config()); |
+ ProxyPrefs::ProxyMode mode; |
+ return !proxy_dict.GetMode(&mode) || mode == ProxyPrefs::MODE_FIXED_SERVERS; |
} |
} // namespace chromeos |