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

Side by Side Diff: chrome/browser/chromeos/net/onc_utils.h

Issue 1228543002: Translate ONC ProxySettings <-> Shill ProxyConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add SchemeToString Created 5 years, 5 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
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 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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "components/onc/onc_constants.h" 11 #include "components/onc/onc_constants.h"
12 12
13 class PrefService; 13 class PrefService;
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 class ListValue; 17 class ListValue;
18 } 18 }
19 19
20 namespace user_manager { 20 namespace user_manager {
21 class User; 21 class User;
22 } 22 }
23 23
24 namespace chromeos { 24 namespace chromeos {
25 25
26 class NetworkState; 26 class NetworkState;
27 27
28 namespace onc { 28 namespace onc {
29 29
30 // Translates |onc_proxy_settings|, which has to be a valid ONC ProxySettings
31 // dictionary, to a ProxyConfig dictionary (see
32 // components/proxy_config/proxy_config_dictionary.h).
33 //
34 // This function is used to translate ONC ProxySettings to the "ProxyConfig"
35 // field of the Shill configuration.
36 scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig(
37 const base::DictionaryValue& onc_proxy_settings);
38
39 // Replaces string placeholders in |network_configs|, which must be a list of 30 // Replaces string placeholders in |network_configs|, which must be a list of
40 // ONC NetworkConfigurations. Currently only user name placeholders are 31 // ONC NetworkConfigurations. Currently only user name placeholders are
41 // implemented, which are replaced by attributes of the logged-in user with 32 // implemented, which are replaced by attributes of the logged-in user with
42 // |hashed_username|. 33 // |hashed_username|.
43 void ExpandStringPlaceholdersInNetworksForUser( 34 void ExpandStringPlaceholdersInNetworksForUser(
44 const user_manager::User* user, 35 const user_manager::User* user,
45 base::ListValue* network_configs); 36 base::ListValue* network_configs);
46 37
47 void ImportNetworksForUser(const user_manager::User* user, 38 void ImportNetworksForUser(const user_manager::User* user,
48 const base::ListValue& network_configs, 39 const base::ListValue& network_configs,
(...skipping 27 matching lines...) Expand all
76 67
77 // Convenience function to check only whether a policy for a network exists. 68 // Convenience function to check only whether a policy for a network exists.
78 bool HasPolicyForNetwork(const PrefService* profile_prefs, 69 bool HasPolicyForNetwork(const PrefService* profile_prefs,
79 const PrefService* local_state_prefs, 70 const PrefService* local_state_prefs,
80 const NetworkState& network); 71 const NetworkState& network);
81 72
82 } // namespace onc 73 } // namespace onc
83 } // namespace chromeos 74 } // namespace chromeos
84 75
85 #endif // CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_ 76 #endif // CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/net/onc_utils.cc » ('j') | chromeos/network/onc/onc_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698