OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_MERGER_H_ | 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_MERGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_MERGER_H_ | 6 #define CHROMEOS_NETWORK_ONC_ONC_MERGER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chromeos/chromeos_export.h" |
9 | 10 |
10 namespace base { | 11 namespace base { |
11 class DictionaryValue; | 12 class DictionaryValue; |
12 } | 13 } |
13 | 14 |
14 namespace chromeos { | 15 namespace chromeos { |
15 namespace onc { | 16 namespace onc { |
16 | 17 |
17 // Merges the given |user_onc| and |shared_onc| settings with the given | 18 // Merges the given |user_onc| and |shared_onc| settings with the given |
18 // |user_policy| and |device_policy| settings. Each can be omitted by prodiving | 19 // |user_policy| and |device_policy| settings. Each can be omitted by providing |
19 // a NULL pointer. Each dictionary has to be a valid ONC dictionary. They don't | 20 // a NULL pointer. Each dictionary has to be a valid ONC dictionary. They don't |
20 // have to describe top-level ONC but should refer to the same section in | 21 // have to describe top-level ONC but should refer to the same section in |
21 // ONC. |user_onc| and |shared_onc| should not contain kRecommended fields. The | 22 // ONC. |user_onc| and |shared_onc| should not contain kRecommended fields. The |
22 // resulting dictionary is valid ONC but may contain dispensable fields (e.g. in | 23 // resulting dictionary is valid ONC but may contain dispensable fields (e.g. in |
23 // a network with type: "WiFi", the field "VPN" is dispensable) that can be | 24 // a network with type: "WiFi", the field "VPN" is dispensable) that can be |
24 // removed by the caller using the ONC normalizer. ONC conformance of the | 25 // removed by the caller using the ONC normalizer. ONC conformance of the |
25 // arguments is not checked. Use ONC validator for that. | 26 // arguments is not checked. Use ONC validator for that. |
26 scoped_ptr<base::DictionaryValue> MergeSettingsWithPolicies( | 27 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MergeSettingsWithPolicies( |
27 const base::DictionaryValue* user_policy, | 28 const base::DictionaryValue* user_policy, |
28 const base::DictionaryValue* device_policy, | 29 const base::DictionaryValue* device_policy, |
29 const base::DictionaryValue* user_onc, | 30 const base::DictionaryValue* user_onc, |
30 const base::DictionaryValue* shared_onc); | 31 const base::DictionaryValue* shared_onc); |
31 | 32 |
32 } // namespace onc | 33 } // namespace onc |
33 } // namespace chromeos | 34 } // namespace chromeos |
34 | 35 |
35 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_SETTINGS_ONC_MERGER_H_ | 36 #endif // CHROMEOS_NETWORK_ONC_ONC_MERGER_H_ |
OLD | NEW |