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

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 3 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
« no previous file with comments | « chromeos/network/proxy/ui_proxy_config_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2fc9bda560fd892cb75561c8d15668024558556b 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(nullptr, local_state_prefs_,
+ *network, &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_);
« no previous file with comments | « chromeos/network/proxy/ui_proxy_config_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698