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

Unified Diff: chromeos/network/policy_applicator.cc

Issue 23451044: Add an Ethernet EAP policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed remaining comments. # Created 7 years, 3 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_handler.cc ('k') | chromeos/network/policy_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/policy_applicator.cc
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc
index bc2315d21dd09f1f21d5b2792ebbc776a14f4c0b..1b6d95fb727f159b536718e8d6630208e10c20bf 100644
--- a/chromeos/network/policy_applicator.cc
+++ b/chromeos/network/policy_applicator.cc
@@ -209,6 +209,22 @@ void PolicyApplicator::CreateAndWriteNewShillConfiguration(
const std::string& guid,
const base::DictionaryValue& policy,
const base::DictionaryValue* user_settings) {
+ // Ethernet (non EAP) settings, like GUID or UIData, cannot be stored per
+ // user. Abort in that case.
+ std::string type;
+ policy.GetStringWithoutPathExpansion(onc::network_config::kType, &type);
+ if (type == onc::network_type::kEthernet &&
+ profile_.type() == NetworkProfile::TYPE_USER) {
+ const base::DictionaryValue* ethernet = NULL;
+ policy.GetDictionaryWithoutPathExpansion(onc::network_config::kEthernet,
+ &ethernet);
+ std::string auth;
+ ethernet->GetStringWithoutPathExpansion(onc::ethernet::kAuthentication,
+ &auth);
+ if (auth == onc::ethernet::kNone)
+ return;
+ }
+
scoped_ptr<base::DictionaryValue> shill_dictionary =
policy_util::CreateShillConfiguration(
profile_, guid, &policy, user_settings);
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | chromeos/network/policy_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698