Index: chromeos/network/network_connection_handler.h |
diff --git a/chromeos/network/network_connection_handler.h b/chromeos/network/network_connection_handler.h |
index afe09e40da561fea43e9febd170c0def47d924de..681d264f0ba23a8401e0f2ca77bfd096dc5866d1 100644 |
--- a/chromeos/network/network_connection_handler.h |
+++ b/chromeos/network/network_connection_handler.h |
@@ -14,6 +14,7 @@ |
#include "base/values.h" |
#include "chromeos/chromeos_export.h" |
#include "chromeos/dbus/dbus_method_call_status.h" |
+#include "chromeos/network/network_handler.h" |
#include "chromeos/network/network_handler_callbacks.h" |
namespace chromeos { |
@@ -48,14 +49,7 @@ class CHROMEOS_EXPORT NetworkConnectionHandler |
static const char kErrorConfigurationRequired[]; |
static const char kErrorShillError[]; |
- // Sets the global instance. Must be called before any calls to Get(). |
- static void Initialize(); |
- |
- // Destroys the global instance. |
- static void Shutdown(); |
- |
- // Gets the global instance. Initialize() must be called first. |
- static NetworkConnectionHandler* Get(); |
+ ~NetworkConnectionHandler(); |
// ConnectToNetwork() will start an asynchronous connection attempt. |
// On success, |success_callback| will be called. |
@@ -85,8 +79,12 @@ class CHROMEOS_EXPORT NetworkConnectionHandler |
const network_handler::ErrorCallback& error_callback); |
private: |
+ friend class NetworkHandler; |
+ friend class NetworkConnectionHandlerTest; |
NetworkConnectionHandler(); |
- ~NetworkConnectionHandler(); |
+ |
+ void Init(NetworkStateHandler* network_state_handler, |
+ NetworkConfigurationHandler* network_configuration_handler); |
// Calls Shill.Manager.Connect asynchronously. |
void CallShillConnect( |
@@ -129,6 +127,11 @@ class CHROMEOS_EXPORT NetworkConnectionHandler |
const std::string& error_name, |
const std::string& error_message); |
+ // Local references to the associated handler instances. |
+ NetworkStateHandler* network_state_handler_; |
+ NetworkProfileHandler* network_profile_handler_; |
+ NetworkConfigurationHandler* network_configuration_handler_; |
+ |
// Set of pending connect requests, used to prevent repeat attempts while |
// waiting for Shill. |
std::set<std::string> pending_requests_; |