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

Unified Diff: chromeos/network/policy_applicator.h

Issue 23526016: Autoconnect policy for CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed policy. Created 7 years, 2 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/onc/onc_validator_unittest.cc ('k') | chromeos/network/policy_applicator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/policy_applicator.h
diff --git a/chromeos/network/policy_applicator.h b/chromeos/network/policy_applicator.h
index ea423f6455b4e99707a071cd1b89260ba4ca85cb..facb37833781432b7d26d0502d25863cd38f9872 100644
--- a/chromeos/network/policy_applicator.h
+++ b/chromeos/network/policy_applicator.h
@@ -11,12 +11,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/values.h"
#include "chromeos/network/network_profile.h"
-namespace base {
-class DictionaryValue;
-}
-
namespace chromeos {
// This class compares (entry point is Run()) |modified_policies| with the
@@ -36,6 +33,10 @@ class PolicyApplicator : public base::RefCounted<PolicyApplicator> {
virtual void CreateConfigurationFromPolicy(
const base::DictionaryValue& shill_properties) = 0;
+ virtual void UpdateExistingConfigurationWithPropertiesFromPolicy(
+ const base::DictionaryValue& existing_properties,
+ const base::DictionaryValue& new_properties) = 0;
+
private:
DISALLOW_ASSIGN(ConfigurationHandler);
};
@@ -46,6 +47,7 @@ class PolicyApplicator : public base::RefCounted<PolicyApplicator> {
PolicyApplicator(base::WeakPtr<ConfigurationHandler> handler,
const NetworkProfile& profile,
const GuidToPolicyMap& all_policies,
+ const base::DictionaryValue& global_network_config,
std::set<std::string>* modified_policies);
void Run();
@@ -74,6 +76,14 @@ class PolicyApplicator : public base::RefCounted<PolicyApplicator> {
const base::DictionaryValue& policy,
const base::DictionaryValue* user_settings);
+ // Adds properties to |properties_to_update|, which are enforced on an
+ // unamaged network by the global network config of the policy.
+ // |entry_properties| are the network's current properties read from its
+ // profile entry.
+ void GetPropertiesForUnmanagedEntry(
+ const base::DictionaryValue& entry_properties,
+ base::DictionaryValue* properties_to_update) const;
+
// Called once all Profile entries are processed. Calls
// ApplyRemainingPolicies.
virtual ~PolicyApplicator();
@@ -86,6 +96,7 @@ class PolicyApplicator : public base::RefCounted<PolicyApplicator> {
base::WeakPtr<ConfigurationHandler> handler_;
NetworkProfile profile_;
GuidToPolicyMap all_policies_;
+ base::DictionaryValue global_network_config_;
DISALLOW_COPY_AND_ASSIGN(PolicyApplicator);
};
« no previous file with comments | « chromeos/network/onc/onc_validator_unittest.cc ('k') | chromeos/network/policy_applicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698