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 648e23f40df2b176e5dc9f78fc230137217500af..4fd651cc2d20242f5e62b768f9e6f17bad51643b 100644 |
--- a/chrome/browser/policy/network_configuration_updater.h |
+++ b/chrome/browser/policy/network_configuration_updater.h |
@@ -9,7 +9,11 @@ |
#include <string> |
#include "chrome/browser/chromeos/cros/network_ui_data.h" |
-#include "chrome/browser/policy/configuration_policy_provider.h" |
+#include "chrome/browser/policy/policy_service.h" |
+ |
+namespace base { |
+class Value; |
+} |
namespace chromeos { |
class NetworkLibrary; |
@@ -21,33 +25,26 @@ class PolicyMap; |
// Keeps track of the network configuration policy settings and updates the |
// network definitions whenever the configuration changes. |
-class NetworkConfigurationUpdater |
- : public ConfigurationPolicyProvider::Observer { |
+class NetworkConfigurationUpdater { |
public: |
- NetworkConfigurationUpdater(ConfigurationPolicyProvider* provider, |
+ NetworkConfigurationUpdater(PolicyService* policy_service, |
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(const PolicyMap& policy_map, |
- const char* policy_name, |
- chromeos::NetworkUIData::ONCSource onc_source, |
- std::string* cached_value); |
+ void ApplyNetworkConfiguration(chromeos::NetworkUIData::ONCSource onc_source, |
+ std::string* cached_value, |
+ const base::Value* previous, |
+ const base::Value* current); |
- // Wraps the provider we read network configuration from. |
- ConfigurationPolicyObserverRegistrar provider_registrar_; |
+ // Wraps the policy service we read network configuration from. |
+ PolicyChangeRegistrar policy_change_registrar_; |
// Network library to write network configuration to. |
chromeos::NetworkLibrary* network_library_; |