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

Unified Diff: chromeos/network/policy_util.h

Issue 510123004: Apply global auto connect ONC policy in GetManagedProperties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit. Created 6 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/policy_applicator.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_util.h
diff --git a/chromeos/network/policy_util.h b/chromeos/network/policy_util.h
index 73701e3ba5a397ed1e0ac4e3437c44ae01dd2257..841c00185e7e4e179e13f8c6e5d06d957fe4186b 100644
--- a/chromeos/network/policy_util.h
+++ b/chromeos/network/policy_util.h
@@ -22,15 +22,37 @@ namespace policy_util {
typedef std::map<std::string, const base::DictionaryValue*> GuidToPolicyMap;
+// Creates a managed ONC dictionary from the given arguments. Depending on the
+// profile type, the policies are assumed to come from the user or device policy
+// and and |user_settings| to be the user's non-shared or shared settings.
+// Each of the arguments can be NULL.
+// TODO(pneubeck): Add documentation of the returned format, see
+// https://crbug.com/408990 .
+scoped_ptr<base::DictionaryValue> CreateManagedONC(
+ const base::DictionaryValue* global_policy,
+ const base::DictionaryValue* network_policy,
+ const base::DictionaryValue* user_settings,
+ const base::DictionaryValue* active_settings,
+ const NetworkProfile* profile);
+
+// Adds properties to |shill_properties_to_update|, which are enforced on an
+// unamaged network by the global config |global_network_policy| of the policy.
+// |shill_dictionary| are the network's current properties read from Shill.
+void SetShillPropertiesForGlobalPolicy(
+ const base::DictionaryValue& shill_dictionary,
+ const base::DictionaryValue& global_network_policy,
+ base::DictionaryValue* shill_properties_to_update);
+
// Creates a Shill property dictionary from the given arguments. The resulting
// dictionary will be sent to Shill by the caller. Depending on the profile
-// type, |policy| is interpreted as the user or device policy and
-// |user_settings| as the user or shared settings. |policy| or |user_settings|
-// can be NULL, but not both.
+// type, |network_policy| is interpreted as the user or device policy and
+// |user_settings| as the user or shared settings. |network_policy| or
+// |user_settings| can be NULL, but not both.
scoped_ptr<base::DictionaryValue> CreateShillConfiguration(
const NetworkProfile& profile,
const std::string& guid,
- const base::DictionaryValue* policy,
+ const base::DictionaryValue* global_policy,
+ const base::DictionaryValue* network_policy,
const base::DictionaryValue* user_settings);
// Returns the policy from |policies| matching |actual_network|, if any exists.
« no previous file with comments | « chromeos/network/policy_applicator.cc ('k') | chromeos/network/policy_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698