Index: chrome/browser/chromeos/policy/network_configuration_updater2.h |
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater2.h b/chrome/browser/chromeos/policy/network_configuration_updater2.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9787dfe3d301920773944f77b688c0cecb3d1e10 |
--- /dev/null |
+++ b/chrome/browser/chromeos/policy/network_configuration_updater2.h |
@@ -0,0 +1,57 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_CONFIGURATION_UPDATER2_H_ |
+#define CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_CONFIGURATION_UPDATER2_H_ |
+ |
+#include <string> |
+ |
+#include "chrome/browser/policy/policy_service.h" |
+#include "chromeos/network/onc/onc_constants.h" |
+ |
+namespace base { |
+class Value; |
+} |
+ |
+namespace policy { |
+ |
+class PolicyMap; |
+ |
+// Keeps track of the network configuration policy settings and Shill's |
+// profiles. Requests the NetworkLibrary to apply the ONC of the network |
stevenjb
2013/04/11 18:20:08
This version doesn't use NetworkLibrary, right?
pneubeck (no reviews)
2013/04/15 12:16:24
I will write write 100 times "You shall not copy a
|
+// policies every time one of the relevant policies or Shill's profiles changes |
+// or OnUserPolicyInitialized() is called. If the user policy is available, |
+// always both the device and the user policy are applied. Otherwise only the |
+// device policy is applied. |
+class NetworkConfigurationUpdater2 { |
pastarmovj
2013/04/11 14:46:29
Please make NetworkConfigurationUpdater2 and etwor
stevenjb
2013/04/11 18:20:08
Agreed that we should use a pure virtual base clas
pneubeck (no reviews)
2013/04/15 12:16:24
Done. The only thing I didn't rename is the test f
pneubeck (no reviews)
2013/04/15 12:16:24
Done.
|
+ public: |
+ explicit NetworkConfigurationUpdater2(PolicyService* policy_service); |
+ virtual ~NetworkConfigurationUpdater2(); |
+ |
+ void OnUserPolicyInitialized(); |
+ |
+ private: |
+ // Callback that's called by |policy_service_| if the respective ONC policy |
+ // changed. |
+ void OnPolicyChanged(chromeos::onc::ONCSource onc_source, |
+ const base::Value* previous, |
+ const base::Value* current); |
+ |
+ void ApplyNetworkConfiguration(chromeos::onc::ONCSource onc_source); |
+ |
+ // Whether the user policy is already available. |
+ bool user_policy_initialized_; |
+ |
+ // Wraps the policy service we read network configuration from. |
+ PolicyChangeRegistrar policy_change_registrar_; |
+ |
+ // The policy service storing the ONC policies. |
+ PolicyService* policy_service_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater2); |
+}; |
+ |
+} // namespace policy |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_POLICY_NETWORK_CONFIGURATION_UPDATER2_H_ |