OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ |
6 #define CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ | 6 #define CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 #include "chrome/browser/chromeos/cros/network_ui_data.h" |
11 #include "chrome/browser/policy/configuration_policy_provider.h" | 12 #include "chrome/browser/policy/configuration_policy_provider.h" |
12 | 13 |
13 namespace chromeos { | 14 namespace chromeos { |
14 class NetworkLibrary; | 15 class NetworkLibrary; |
15 } | 16 } |
16 | 17 |
17 namespace policy { | 18 namespace policy { |
18 | 19 |
19 class PolicyMap; | 20 class PolicyMap; |
20 | 21 |
(...skipping 11 matching lines...) Expand all Loading... |
32 | 33 |
33 private: | 34 private: |
34 // Grabs network configuration from policy and applies it. | 35 // Grabs network configuration from policy and applies it. |
35 void Update(); | 36 void Update(); |
36 | 37 |
37 // Extracts ONC string from |policy_map| and pushes the configuration to | 38 // Extracts ONC string from |policy_map| and pushes the configuration to |
38 // |network_library_| if it's different from |*cached_value| (which is | 39 // |network_library_| if it's different from |*cached_value| (which is |
39 // updated). | 40 // updated). |
40 void ApplyNetworkConfiguration(const PolicyMap& policy_map, | 41 void ApplyNetworkConfiguration(const PolicyMap& policy_map, |
41 ConfigurationPolicyType policy_type, | 42 ConfigurationPolicyType policy_type, |
| 43 chromeos::NetworkUIData::ONCSource onc_source, |
42 std::string* cached_value); | 44 std::string* cached_value); |
43 | 45 |
44 // Wraps the provider we read network configuration from. | 46 // Wraps the provider we read network configuration from. |
45 ConfigurationPolicyObserverRegistrar provider_registrar_; | 47 ConfigurationPolicyObserverRegistrar provider_registrar_; |
46 | 48 |
47 // Network library to write network configuration to. | 49 // Network library to write network configuration to. |
48 chromeos::NetworkLibrary* network_library_; | 50 chromeos::NetworkLibrary* network_library_; |
49 | 51 |
50 // Current settings. | 52 // Current settings. |
51 std::string device_network_config_; | 53 std::string device_network_config_; |
52 std::string user_network_config_; | 54 std::string user_network_config_; |
53 | 55 |
54 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater); | 56 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace policy | 59 } // namespace policy |
58 | 60 |
59 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ | 61 #endif // CHROME_BROWSER_POLICY_NETWORK_CONFIGURATION_UPDATER_H_ |
OLD | NEW |