Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: chromeos/network/network_configuration_handler.h

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Add NetworkConnectionHandler to NetworkHandler Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_configuration_handler.h
diff --git a/chromeos/network/network_configuration_handler.h b/chromeos/network/network_configuration_handler.h
index 1707ca06a236569535fd7f88f5991cd453977e25..bb73a2b672b81280d766f00deb730f5a915d8f29 100644
--- a/chromeos/network/network_configuration_handler.h
+++ b/chromeos/network/network_configuration_handler.h
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "chromeos/chromeos_export.h"
+#include "chromeos/network/network_handler.h"
#include "chromeos/network/network_handler_callbacks.h"
namespace base {
@@ -43,15 +44,6 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler {
public:
~NetworkConfigurationHandler();
- // 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 NetworkConfigurationHandler* Get();
-
// Gets the properties of the network with id |service_path|. See note on
// |callback| and |error_callback|, in class description above.
void GetProperties(
@@ -97,7 +89,11 @@ class CHROMEOS_EXPORT NetworkConfigurationHandler {
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) const;
- private:
+ // Construct and initialize an instance for testing.
+ static NetworkConfigurationHandler* InitializeForTest();
+
+ protected:
+ friend class NetworkHandler;
friend class NetworkConfigurationHandlerTest;
NetworkConfigurationHandler();

Powered by Google App Engine
This is Rietveld 408576698