onc_utils.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
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.
4
5#ifndef CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_
6#define CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_
7
8#include "base/memory/scoped_ptr.h"
9#include "chromeos/network/onc/onc_constants.h"
10
11namespace base {
12class DictionaryValue;
13}
14
15namespace chromeos {
16
17class NetworkUIData;
18
19namespace onc {
20
21// Translates |onc_proxy_settings|, which has to be a valid ONC ProxySettings
22// dictionary, to a ProxyConfig dictionary (see
23// chrome/browser/prefs/proxy_config_dictionary.h).
24//
25// This function is used to translate ONC ProxySettings to the "ProxyConfig"
26// field of the Shill configuration.
27scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig(
28    const base::DictionaryValue& onc_proxy_settings);
29
30// Creates a NetworkUIData object from |onc_network|, which has to be a valid
31// ONC NetworkConfiguration dictionary.
32//
33// This function is used to create the "UIData" field of the Shill
34// configuration.
35scoped_ptr<NetworkUIData> CreateUIData(
36    ONCSource onc_source,
37    const base::DictionaryValue& onc_network);
38
39}  // namespace onc
40}  // namespace chromeos
41
42#endif  // CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_
43