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

Unified Diff: chrome/browser/ui/webui/chromeos/login/network_state_informer.cc

Issue 16398005: Extract common per-network proxy configuration functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit. Created 7 years, 6 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
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 28832bc4dfb91f47e5e66cd3c18d4151addb4d4d..dbd01b9b279d995c2303070e2411836c5c0107fd 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_state_informer.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "chrome/browser/chromeos/net/proxy_config_handler.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
#include "chrome/browser/prefs/proxy_prefs.h"
#include "chrome/common/chrome_notification_types.h"
@@ -213,9 +214,12 @@ NetworkStateInformer::State NetworkStateInformer::GetNetworkState(
bool NetworkStateInformer::IsProxyConfigured(const NetworkState* network) {
DCHECK(network);
- ProxyConfigDictionary proxy_dict(&network->proxy_config());
+ scoped_ptr<ProxyConfigDictionary> proxy_dict(
+ proxy_config::GetProxyConfigForNetwork(*network));
ProxyPrefs::ProxyMode mode;
- return proxy_dict.GetMode(&mode) && mode == ProxyPrefs::MODE_FIXED_SERVERS;
+ return (proxy_dict &&
+ proxy_dict->GetMode(&mode) &&
+ mode == ProxyPrefs::MODE_FIXED_SERVERS);
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/prefs/proxy_config_dictionary.cc ('k') | chrome/browser/ui/webui/options/preferences_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698