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

Side by Side Diff: chromeos/network/onc/onc_merger.h

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_constants.cc ('k') | chromeos/network/onc/onc_merger.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 (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 CHROMEOS_NETWORK_ONC_ONC_MERGER_H_ 5 #ifndef CHROMEOS_NETWORK_ONC_ONC_MERGER_H_
6 #define CHROMEOS_NETWORK_ONC_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 #include "chromeos/chromeos_export.h"
10 10
11 namespace base { 11 namespace base {
12 class DictionaryValue; 12 class DictionaryValue;
13 } 13 }
14 14
15 namespace chromeos { 15 namespace chromeos {
16 namespace onc { 16 namespace onc {
17 17
18 struct OncValueSignature;
19
18 // Merges the given |user_settings| and |shared_settings| settings with the 20 // Merges the given |user_settings| and |shared_settings| settings with the
19 // given |user_policy| and |device_policy| settings. Each can be omitted by 21 // given |user_policy| and |device_policy| settings. Each can be omitted by
20 // providing a NULL pointer. Each dictionary has to be part of a valid ONC 22 // providing a NULL pointer. Each dictionary has to be part of a valid ONC
21 // dictionary. They don't have to describe top-level ONC but should refer to the 23 // dictionary. They don't have to describe top-level ONC but should refer to the
22 // same section in ONC. |user_settings| and |shared_settings| should not contain 24 // same section in ONC. |user_settings| and |shared_settings| should not contain
23 // kRecommended fields. The resulting dictionary is valid ONC but may contain 25 // kRecommended fields. The resulting dictionary is valid ONC but may contain
24 // dispensable fields (e.g. in a network with type: "WiFi", the field "VPN" is 26 // dispensable fields (e.g. in a network with type: "WiFi", the field "VPN" is
25 // dispensable) that can be removed by the caller using the ONC normalizer. ONC 27 // dispensable) that can be removed by the caller using the ONC normalizer. ONC
26 // conformance of the arguments is not checked. Use ONC validator for that. 28 // conformance of the arguments is not checked. Use ONC validator for that.
27 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> 29 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
28 MergeSettingsAndPoliciesToEffective( 30 MergeSettingsAndPoliciesToEffective(
29 const base::DictionaryValue* user_policy, 31 const base::DictionaryValue* user_policy,
30 const base::DictionaryValue* device_policy, 32 const base::DictionaryValue* device_policy,
31 const base::DictionaryValue* user_settings, 33 const base::DictionaryValue* user_settings,
32 const base::DictionaryValue* shared_settings); 34 const base::DictionaryValue* shared_settings);
33 35
34 // Like MergeSettingsWithPoliciesToEffective but creates one dictionary in place 36 // Like MergeSettingsWithPoliciesToEffective but creates one dictionary in place
35 // of each field that exists in any of the argument dictionaries. Each of these 37 // of each field that exists in any of the argument dictionaries. Each of these
36 // dictionaries contains the onc::kAugmentations* fields (see onc_constants.h) 38 // dictionaries contains the onc::kAugmentations* fields (see onc_constants.h)
37 // for which a value is available. The onc::kAugmentationEffectiveSetting field 39 // for which a value is available. The onc::kAugmentationEffectiveSetting field
38 // contains the field name of the field containing the effective field that 40 // contains the field name of the field containing the effective field that
39 // overrides all other values. 41 // overrides all other values. Credentials from policies are not written to the
42 // result.
40 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> 43 CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue>
41 MergeSettingsAndPoliciesToAugmented( 44 MergeSettingsAndPoliciesToAugmented(
45 const OncValueSignature& signature,
42 const base::DictionaryValue* user_policy, 46 const base::DictionaryValue* user_policy,
43 const base::DictionaryValue* device_policy, 47 const base::DictionaryValue* device_policy,
44 const base::DictionaryValue* user_settings, 48 const base::DictionaryValue* user_settings,
45 const base::DictionaryValue* shared_settings); 49 const base::DictionaryValue* shared_settings,
50 const base::DictionaryValue* active_settings);
46 51
47 } // namespace onc 52 } // namespace onc
48 } // namespace chromeos 53 } // namespace chromeos
49 54
50 #endif // CHROMEOS_NETWORK_ONC_ONC_MERGER_H_ 55 #endif // CHROMEOS_NETWORK_ONC_ONC_MERGER_H_
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_constants.cc ('k') | chromeos/network/onc/onc_merger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698