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

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

Issue 22796014: Eliminate c/b/chromeos/options/network_connect.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix clang Created 7 years, 4 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
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 "chromeos/network/onc/onc_constants.h" 11 #include "chromeos/network/onc/onc_constants.h"
12 12
13 namespace base { 13 namespace base {
14 class DictionaryValue; 14 class DictionaryValue;
15 class ListValue; 15 class ListValue;
16 } 16 }
17 17
18 namespace chromeos { 18 namespace chromeos {
19
20 class NetworkState;
21
19 namespace onc { 22 namespace onc {
20 23
21 // Translates |onc_proxy_settings|, which has to be a valid ONC ProxySettings 24 // Translates |onc_proxy_settings|, which has to be a valid ONC ProxySettings
22 // dictionary, to a ProxyConfig dictionary (see 25 // dictionary, to a ProxyConfig dictionary (see
23 // chrome/browser/prefs/proxy_config_dictionary.h). 26 // chrome/browser/prefs/proxy_config_dictionary.h).
24 // 27 //
25 // This function is used to translate ONC ProxySettings to the "ProxyConfig" 28 // This function is used to translate ONC ProxySettings to the "ProxyConfig"
26 // field of the Shill configuration. 29 // field of the Shill configuration.
27 scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig( 30 scoped_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig(
28 const base::DictionaryValue& onc_proxy_settings); 31 const base::DictionaryValue& onc_proxy_settings);
29 32
30 // Replaces string placeholders in |network_configs|, which must be a list of 33 // Replaces string placeholders in |network_configs|, which must be a list of
31 // ONC NetworkConfigurations. Currently only user name placeholders are 34 // ONC NetworkConfigurations. Currently only user name placeholders are
32 // implemented, which are replaced by attributes of the logged-in user with 35 // implemented, which are replaced by attributes of the logged-in user with
33 // |hashed_username|. 36 // |hashed_username|.
34 void ExpandStringPlaceholdersInNetworksForUser( 37 void ExpandStringPlaceholdersInNetworksForUser(
35 const std::string& hashed_username, 38 const std::string& hashed_username,
36 base::ListValue* network_configs); 39 base::ListValue* network_configs);
37 40
38 void ImportNetworksForUser(const std::string& hashed_username, 41 void ImportNetworksForUser(const std::string& hashed_username,
39 const base::ListValue& network_configs, 42 const base::ListValue& network_configs,
40 std::string* error); 43 std::string* error);
41 44
45 // Looks up the policy for |guid| for the current active user and sets
46 // |onc_source| accordingly.
47 const base::DictionaryValue* FindPolicyForActiveUser(
48 const std::string& guid,
49 onc::ONCSource* onc_source);
50
42 } // namespace onc 51 } // namespace onc
43 } // namespace chromeos 52 } // namespace chromeos
44 53
45 #endif // CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_ 54 #endif // CHROME_BROWSER_CHROMEOS_NET_ONC_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698