OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 const network_handler::ErrorCallback& error_callback) const = 0; | 94 const network_handler::ErrorCallback& error_callback) const = 0; |
95 | 95 |
96 // Removes the user's configuration from the network with |service_path|. The | 96 // Removes the user's configuration from the network with |service_path|. The |
97 // network may still show up in the visible networks after this, but no user | 97 // network may still show up in the visible networks after this, but no user |
98 // configuration will remain. If it was managed, it will still be configured. | 98 // configuration will remain. If it was managed, it will still be configured. |
99 virtual void RemoveConfiguration( | 99 virtual void RemoveConfiguration( |
100 const std::string& service_path, | 100 const std::string& service_path, |
101 const base::Closure& callback, | 101 const base::Closure& callback, |
102 const network_handler::ErrorCallback& error_callback) const = 0; | 102 const network_handler::ErrorCallback& error_callback) const = 0; |
103 | 103 |
104 // Only to be called by NetworkConfigurationUpdater or from tests. Sets | 104 // Only to be called by NetworkConfigurationUpdater or from tests. Sets |
105 // |network_configs_onc| as the current policy of |onc_source|. The network | 105 // |network_configs_onc| and |global_network_config| as the current policy of |
106 // configurations of the policy will be applied (not necessarily immediately) | 106 // |userhash| and |onc_source|. The policy will be applied (not necessarily |
107 // to Shill's profiles and enforced in future configurations until the policy | 107 // immediately) to Shill's profiles and enforced in future configurations |
108 // associated with |onc_source| is changed again with this function. For | 108 // until the policy associated with |userhash| and |onc_source| is changed |
109 // device policies, |userhash| must be empty. | 109 // again with this function. For device policies, |userhash| must be empty. |
110 virtual void SetPolicy(::onc::ONCSource onc_source, | 110 virtual void SetPolicy( |
111 const std::string& userhash, | 111 ::onc::ONCSource onc_source, |
112 const base::ListValue& network_configs_onc) = 0; | 112 const std::string& userhash, |
| 113 const base::ListValue& network_configs_onc, |
| 114 const base::DictionaryValue& global_network_config) = 0; |
113 | 115 |
114 // Returns the user policy for user |userhash| or device policy, which has | 116 // Returns the user policy for user |userhash| or device policy, which has |
115 // |guid|. If |userhash| is empty, only looks for a device policy. If such | 117 // |guid|. If |userhash| is empty, only looks for a device policy. If such |
116 // doesn't exist, returns NULL. Sets |onc_source| accordingly. | 118 // doesn't exist, returns NULL. Sets |onc_source| accordingly. |
117 virtual const base::DictionaryValue* FindPolicyByGUID( | 119 virtual const base::DictionaryValue* FindPolicyByGUID( |
118 const std::string userhash, | 120 const std::string userhash, |
119 const std::string& guid, | 121 const std::string& guid, |
120 ::onc::ONCSource* onc_source) const = 0; | 122 ::onc::ONCSource* onc_source) const = 0; |
121 | 123 |
122 // Returns the policy with |guid| for profile |profile_path|. If such | 124 // Returns the policy with |guid| for profile |profile_path|. If such |
123 // doesn't exist, returns NULL. | 125 // doesn't exist, returns NULL. |
124 virtual const base::DictionaryValue* FindPolicyByGuidAndProfile( | 126 virtual const base::DictionaryValue* FindPolicyByGuidAndProfile( |
125 const std::string& guid, | 127 const std::string& guid, |
126 const std::string& profile_path) const = 0; | 128 const std::string& profile_path) const = 0; |
127 | 129 |
128 private: | 130 private: |
129 DISALLOW_ASSIGN(ManagedNetworkConfigurationHandler); | 131 DISALLOW_ASSIGN(ManagedNetworkConfigurationHandler); |
130 }; | 132 }; |
131 | 133 |
132 } // namespace chromeos | 134 } // namespace chromeos |
133 | 135 |
134 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ | 136 #endif // CHROMEOS_NETWORK_MANAGED_NETWORK_CONFIGURATION_HANDLER_H_ |
OLD | NEW |