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