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

Unified Diff: chromeos/network/network_state.cc

Issue 984863005: Add ash::VPNDelegate and Chrome OS implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash during device-local account login. Created 5 years, 9 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/network_state.h ('k') | ui/chromeos/ui_chromeos_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.cc
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index bd53eae5d141dd190c160e18d13a9109b7993f55..609c9f0f1c7b589ab30ffc2b52ccf1a37ce353da 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -165,6 +165,26 @@ bool NetworkState::PropertyChanged(const std::string& key,
NET_LOG(ERROR) << "Failed to parse " << path() << "." << key;
}
return true;
+ } else if (key == shill::kProviderProperty) {
+ const base::DictionaryValue* dict;
+ std::string provider_type;
+ if (!value.GetAsDictionary(&dict) ||
+ !dict->GetStringWithoutPathExpansion(shill::kTypeProperty,
+ &provider_type)) {
+ return false;
+ }
+
+ if (provider_type != shill::kProviderThirdPartyVpn) {
+ // If the network uses the built-in OpenVPN and L2TP support, set the
+ // provider extension ID to an empty string.
+ vpn_provider_extension_id_.clear();
+ return true;
+ }
+
+ // If the network uses a third-party VPN provider, copy over the provider's
+ // extension ID, which is held in |shill::kHostProperty|.
+ return dict->GetStringWithoutPathExpansion(shill::kHostProperty,
+ &vpn_provider_extension_id_);
}
return false;
}
« no previous file with comments | « chromeos/network/network_state.h ('k') | ui/chromeos/ui_chromeos_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698