Index: chrome/browser/policy/network_configuration_updater.h |
diff --git a/chrome/browser/policy/network_configuration_updater.h b/chrome/browser/policy/network_configuration_updater.h |
index 4fd651cc2d20242f5e62b768f9e6f17bad51643b..648e23f40df2b176e5dc9f78fc230137217500af 100644 |
--- a/chrome/browser/policy/network_configuration_updater.h |
+++ b/chrome/browser/policy/network_configuration_updater.h |
@@ -9,11 +9,7 @@ |
#include <string> |
#include "chrome/browser/chromeos/cros/network_ui_data.h" |
-#include "chrome/browser/policy/policy_service.h" |
- |
-namespace base { |
-class Value; |
-} |
+#include "chrome/browser/policy/configuration_policy_provider.h" |
namespace chromeos { |
class NetworkLibrary; |
@@ -25,26 +21,33 @@ class PolicyMap; |
// Keeps track of the network configuration policy settings and updates the |
// network definitions whenever the configuration changes. |
-class NetworkConfigurationUpdater { |
+class NetworkConfigurationUpdater |
+ : public ConfigurationPolicyProvider::Observer { |
public: |
- NetworkConfigurationUpdater(PolicyService* policy_service, |
+ NetworkConfigurationUpdater(ConfigurationPolicyProvider* provider, |
chromeos::NetworkLibrary* network_library); |
virtual ~NetworkConfigurationUpdater(); |
+ // ConfigurationPolicyProvider::Observer: |
+ virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) OVERRIDE; |
+ |
// Empty network configuration blob. |
static const char kEmptyConfiguration[]; |
private: |
+ // Grabs network configuration from policy and applies it. |
+ void Update(); |
+ |
// Extracts ONC string from |policy_map| and pushes the configuration to |
// |network_library_| if it's different from |*cached_value| (which is |
// updated). |
- void ApplyNetworkConfiguration(chromeos::NetworkUIData::ONCSource onc_source, |
- std::string* cached_value, |
- const base::Value* previous, |
- const base::Value* current); |
+ void ApplyNetworkConfiguration(const PolicyMap& policy_map, |
+ const char* policy_name, |
+ chromeos::NetworkUIData::ONCSource onc_source, |
+ std::string* cached_value); |
- // Wraps the policy service we read network configuration from. |
- PolicyChangeRegistrar policy_change_registrar_; |
+ // Wraps the provider we read network configuration from. |
+ ConfigurationPolicyObserverRegistrar provider_registrar_; |
// Network library to write network configuration to. |
chromeos::NetworkLibrary* network_library_; |