Index: chromeos/network/managed_network_configuration_handler.h |
diff --git a/chromeos/network/managed_network_configuration_handler.h b/chromeos/network/managed_network_configuration_handler.h |
index db7e47d3daaf6821bba9254ee3143b59ee55ee2c..a84b8998690f9e930abb003a8c9e4c340e5ad849 100644 |
--- a/chromeos/network/managed_network_configuration_handler.h |
+++ b/chromeos/network/managed_network_configuration_handler.h |
@@ -13,6 +13,7 @@ |
#include "base/gtest_prod_util.h" |
#include "base/memory/weak_ptr.h" |
#include "chromeos/chromeos_export.h" |
+#include "chromeos/network/network_handler.h" |
#include "chromeos/network/network_handler_callbacks.h" |
#include "chromeos/network/network_profile_observer.h" |
#include "chromeos/network/onc/onc_constants.h" |
@@ -24,8 +25,6 @@ class ListValue; |
namespace chromeos { |
-class NetworkProfileHandler; |
- |
// The ManagedNetworkConfigurationHandler class is used to create and configure |
// networks in ChromeOS using ONC and takes care of network policies. |
// |
@@ -57,17 +56,7 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler |
typedef std::map<std::string, const base::DictionaryValue*> GuidToPolicyMap; |
typedef std::map<std::string, GuidToPolicyMap> UserToPoliciesMap; |
- // Initializes the singleton. |
- static void Initialize(NetworkProfileHandler* profile_handler); |
- |
- // Returns if the singleton is initialized. |
- static bool IsInitialized(); |
- |
- // Destroys the singleton. |
- static void Shutdown(); |
- |
- // Initialize() must be called before this. |
- static ManagedNetworkConfigurationHandler* Get(); |
+ virtual ~ManagedNetworkConfigurationHandler(); |
// Provides the properties of the network with |service_path| to |callback|. |
void GetProperties( |
@@ -143,11 +132,11 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler |
virtual void OnProfileRemoved(const NetworkProfile& profile) OVERRIDE; |
private: |
+ friend class NetworkHandler; |
class PolicyApplicator; |
- explicit ManagedNetworkConfigurationHandler( |
- NetworkProfileHandler* profile_handler); |
- virtual ~ManagedNetworkConfigurationHandler(); |
+ ManagedNetworkConfigurationHandler(); |
+ void Init(); |
void GetManagedPropertiesCallback( |
const network_handler::DictionaryResultCallback& callback, |
@@ -164,9 +153,6 @@ class CHROMEOS_EXPORT ManagedNetworkConfigurationHandler |
// the device policy. |
UserToPoliciesMap policies_by_user_; |
- // A local reference to the policy handler singleton. |
- NetworkProfileHandler* profile_handler_; |
- |
// For Shill client callbacks |
base::WeakPtrFactory<ManagedNetworkConfigurationHandler> weak_ptr_factory_; |