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

Side by Side Diff: chromeos/network/policy_applicator.h

Issue 68213018: ONC policy: Support SSID and Security change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chromeos/network/policy_applicator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ 5 #ifndef CHROMEOS_NETWORK_POLICY_APPLICATOR_H_
6 #define CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ 6 #define CHROMEOS_NETWORK_POLICY_APPLICATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Called with the properties of the profile entry |entry|. Checks whether the 63 // Called with the properties of the profile entry |entry|. Checks whether the
64 // entry was previously managed, whether a current policy applies and then 64 // entry was previously managed, whether a current policy applies and then
65 // either updates, deletes or not touches the entry. 65 // either updates, deletes or not touches the entry.
66 void GetEntryCallback(const std::string& entry, 66 void GetEntryCallback(const std::string& entry,
67 const base::DictionaryValue& entry_properties); 67 const base::DictionaryValue& entry_properties);
68 68
69 // Sends Shill the command to delete profile entry |entry| from |profile_|. 69 // Sends Shill the command to delete profile entry |entry| from |profile_|.
70 void DeleteEntry(const std::string& entry); 70 void DeleteEntry(const std::string& entry);
71 71
72 // Creates a Shill configuration from the given parameters and sends them to 72 // Sends the Shill configuration |shill_dictionary| to Shill.
73 // Shill. |user_settings| can be NULL if none exist. 73 void WriteNewShillConfiguration(const base::DictionaryValue& shill_dictionary,
74 void CreateAndWriteNewShillConfiguration( 74 const base::DictionaryValue& policy);
75 const std::string& guid,
76 const base::DictionaryValue& policy,
77 const base::DictionaryValue* user_settings);
78 75
79 // Adds properties to |properties_to_update|, which are enforced on an 76 // Adds properties to |properties_to_update|, which are enforced on an
80 // unamaged network by the global network config of the policy. 77 // unamaged network by the global network config of the policy.
81 // |entry_properties| are the network's current properties read from its 78 // |entry_properties| are the network's current properties read from its
82 // profile entry. 79 // profile entry.
83 void GetPropertiesForUnmanagedEntry( 80 void GetPropertiesForUnmanagedEntry(
84 const base::DictionaryValue& entry_properties, 81 const base::DictionaryValue& entry_properties,
85 base::DictionaryValue* properties_to_update) const; 82 base::DictionaryValue* properties_to_update) const;
86 83
87 // Called once all Profile entries are processed. Calls 84 // Called once all Profile entries are processed. Calls
88 // ApplyRemainingPolicies. 85 // ApplyRemainingPolicies.
89 virtual ~PolicyApplicator(); 86 virtual ~PolicyApplicator();
90 87
91 // Creates new entries for all remaining policies, i.e. for which no matching 88 // Creates new entries for all remaining policies, i.e. for which no matching
92 // Profile entry was found. 89 // Profile entry was found.
93 void ApplyRemainingPolicies(); 90 void ApplyRemainingPolicies();
94 91
95 std::set<std::string> remaining_policies_; 92 std::set<std::string> remaining_policies_;
96 base::WeakPtr<ConfigurationHandler> handler_; 93 base::WeakPtr<ConfigurationHandler> handler_;
97 NetworkProfile profile_; 94 NetworkProfile profile_;
98 GuidToPolicyMap all_policies_; 95 GuidToPolicyMap all_policies_;
99 base::DictionaryValue global_network_config_; 96 base::DictionaryValue global_network_config_;
100 97
101 DISALLOW_COPY_AND_ASSIGN(PolicyApplicator); 98 DISALLOW_COPY_AND_ASSIGN(PolicyApplicator);
102 }; 99 };
103 100
104 } // namespace chromeos 101 } // namespace chromeos
105 102
106 #endif // CHROMEOS_NETWORK_POLICY_APPLICATOR_H_ 103 #endif // CHROMEOS_NETWORK_POLICY_APPLICATOR_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/policy_applicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698