Index: chromeos/network/network_profile_handler.cc |
diff --git a/chromeos/network/network_profile_handler.cc b/chromeos/network/network_profile_handler.cc |
index 30c8fde78eb00274c715305bae8d8b3596263eae..579bd6935704f50ccff699fad45e0fb48ecb3e19 100644 |
--- a/chromeos/network/network_profile_handler.cc |
+++ b/chromeos/network/network_profile_handler.cc |
@@ -18,8 +18,6 @@ |
namespace chromeos { |
-static NetworkProfileHandler* g_profile_handler_instance = NULL; |
- |
namespace { |
bool ConvertListValueToStringVector(const base::ListValue& string_list, |
@@ -74,31 +72,6 @@ class NetworkProfileHandlerImpl : public NetworkProfileHandler { |
} // namespace |
-// static |
-NetworkProfileHandler* NetworkProfileHandler::Initialize() { |
- CHECK(!g_profile_handler_instance); |
- g_profile_handler_instance = new NetworkProfileHandlerImpl(); |
- return g_profile_handler_instance; |
-} |
- |
-// static |
-bool NetworkProfileHandler::IsInitialized() { |
- return g_profile_handler_instance; |
-} |
- |
-// static |
-void NetworkProfileHandler::Shutdown() { |
- CHECK(g_profile_handler_instance); |
- delete g_profile_handler_instance; |
- g_profile_handler_instance = NULL; |
-} |
- |
-// static |
-NetworkProfileHandler* NetworkProfileHandler::Get() { |
- CHECK(g_profile_handler_instance); |
- return g_profile_handler_instance; |
-} |
- |
void NetworkProfileHandler::AddObserver(NetworkProfileObserver* observer) { |
observers_.AddObserver(observer); |
} |
@@ -182,6 +155,10 @@ void NetworkProfileHandler::GetProfilePropertiesCallback( |
AddProfile(NetworkProfile(profile_path, userhash)); |
} |
+void NetworkProfileHandler::AddProfileForTest(const NetworkProfile& profile) { |
+ AddProfile(profile); |
+} |
+ |
void NetworkProfileHandler::AddProfile(const NetworkProfile& profile) { |
VLOG(2) << "Adding profile " << profile.ToDebugString() << "."; |
profiles_.push_back(profile); |