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