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

Unified Diff: chromeos/network/proxy/ui_proxy_config_service.cc

Issue 2836453003: tray: Show warning in network tray when VPN or proxy used. (Closed)
Patch Set: Fixed patch set 2 errors. Created 3 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
Index: chromeos/network/proxy/ui_proxy_config_service.cc
diff --git a/chromeos/network/proxy/ui_proxy_config_service.cc b/chromeos/network/proxy/ui_proxy_config_service.cc
index 57bf00ec57a0676d23a01feb7fea6d838815acac..62cdbed5567a7f77ff576375cc5722a0672de7ff 100644
--- a/chromeos/network/proxy/ui_proxy_config_service.cc
+++ b/chromeos/network/proxy/ui_proxy_config_service.cc
@@ -153,6 +153,20 @@ void UIProxyConfigService::SetProxyConfig(const std::string& network_guid,
current_ui_config_.state = ProxyPrefs::CONFIG_SYSTEM;
}
+bool UIProxyConfigService::HasDefaultNetworkProxyConfigured() {
+ const NetworkState* network =
+ NetworkHandler::Get()->network_state_handler()->DefaultNetwork();
+ if (!network)
+ return false;
+ onc::ONCSource onc_source = onc::ONC_SOURCE_NONE;
+ std::unique_ptr<ProxyConfigDictionary> proxy_dict =
+ proxy_config::GetProxyConfigForNetwork(NULL, local_state_prefs_, *network,
stevenjb 2017/04/21 18:38:24 nullptr
sammiequon 2017/04/21 19:02:53 Done.
+ &onc_source);
+ ProxyPrefs::ProxyMode mode;
+ return (proxy_dict && proxy_dict->GetMode(&mode) &&
+ mode == ProxyPrefs::MODE_FIXED_SERVERS);
+}
+
void UIProxyConfigService::DetermineEffectiveConfig(
const NetworkState& network) {
DCHECK(local_state_prefs_);

Powered by Google App Engine
This is Rietveld 408576698