summaryrefslogtreecommitdiffstats
path: root/chromeos/network
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-21 19:37:25 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-21 19:37:25 +0000
commitf562f5c9b75925dd621fc3e7d972d6b63847f101 (patch)
treeeef9cbf9d48263a5ac4569a0723751532f19e718 /chromeos/network
parentd26930b2926aeb54b819662d888a8929c0bb0847 (diff)
downloadchromium_src-f562f5c9b75925dd621fc3e7d972d6b63847f101.zip
chromium_src-f562f5c9b75925dd621fc3e7d972d6b63847f101.tar.gz
chromium_src-f562f5c9b75925dd621fc3e7d972d6b63847f101.tar.bz2
Revert "Implement new network change notifier that uses NetworkStateHandler"
chromeos/network/network_change_notifier_chromeos.cc: In member function 'void chromeos::NetworkChangeNotifierChromeos::Initialize()': chromeos/network/network_change_notifier_chromeos.cc:65: error: 'class chromeos::NetworkStateHandler' has no member named 'ActiveNetwork' make: *** [out/Release/obj.target/chromeos/chromeos/network/network_change_notifier_chromeos.o] Error 1 TBR=gauravsh BUG=chromium-os:159647 Review URL: https://codereview.chromium.org/11666011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network')
-rw-r--r--chromeos/network/managed_state.h2
-rw-r--r--chromeos/network/network_change_notifier_chromeos.cc196
-rw-r--r--chromeos/network/network_change_notifier_chromeos.h83
-rw-r--r--chromeos/network/network_change_notifier_chromeos_unittest.cc185
-rw-r--r--chromeos/network/network_change_notifier_factory_chromeos.cc30
-rw-r--r--chromeos/network/network_change_notifier_factory_chromeos.h30
-rw-r--r--chromeos/network/network_state.h1
7 files changed, 0 insertions, 527 deletions
diff --git a/chromeos/network/managed_state.h b/chromeos/network/managed_state.h
index a8176e5..0138df64 100644
--- a/chromeos/network/managed_state.h
+++ b/chromeos/network/managed_state.h
@@ -71,8 +71,6 @@ class ManagedState {
std::string* out_value);
private:
- friend class NetworkChangeNotifierChromeosUpdateTest;
-
ManagedType managed_type_;
// The path (e.g. service path or device path) of the managed state object.
diff --git a/chromeos/network/network_change_notifier_chromeos.cc b/chromeos/network/network_change_notifier_chromeos.cc
deleted file mode 100644
index d47be1b..0000000
--- a/chromeos/network/network_change_notifier_chromeos.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/bind.h"
-#include "chromeos/network/network_change_notifier_chromeos.h"
-#include "chromeos/network/network_state.h"
-#include "chromeos/network/network_state_handler.h"
-#include "net/base/network_change_notifier.h"
-#include "net/dns/dns_config_service_posix.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-namespace chromeos {
-
-// DNS config services on Chrome OS are signalled by the network state handler
-// rather than relying on watching files in /etc.
-class NetworkChangeNotifierChromeos::DnsConfigService
- : public net::internal::DnsConfigServicePosix {
- public:
- DnsConfigService();
- virtual ~DnsConfigService();
-
- // net::internal::DnsConfigService() overrides.
- virtual bool StartWatching() OVERRIDE;
-
- virtual void OnNetworkChange();
-};
-
-NetworkChangeNotifierChromeos::DnsConfigService::DnsConfigService() {
-}
-
-NetworkChangeNotifierChromeos::DnsConfigService::~DnsConfigService() {
-}
-
-bool NetworkChangeNotifierChromeos::DnsConfigService::StartWatching() {
- // DNS config changes are handled and notified by the network state handlers.
- return true;
-}
-
-void NetworkChangeNotifierChromeos::DnsConfigService::OnNetworkChange() {
- InvalidateConfig();
- InvalidateHosts();
- ReadNow();
-}
-
-NetworkChangeNotifierChromeos::NetworkChangeNotifierChromeos()
- : NetworkChangeNotifier(NetworkChangeCalculatorParamsChromeos()),
- connection_type_(CONNECTION_NONE) {
-}
-
-NetworkChangeNotifierChromeos::~NetworkChangeNotifierChromeos() {
-}
-
-void NetworkChangeNotifierChromeos::Initialize() {
- NetworkStateHandler::Get()->AddObserver(this);
-
- dns_config_service_.reset(new DnsConfigService());
- dns_config_service_->WatchConfig(
- base::Bind(net::NetworkChangeNotifier::SetDnsConfig));
-
- // Update initial connection state.
- ActiveNetworkChanged(NetworkStateHandler::Get()->ActiveNetwork());
-}
-
-void NetworkChangeNotifierChromeos::Shutdown() {
- dns_config_service_.reset();
- if (NetworkStateHandler::Get())
- NetworkStateHandler::Get()->RemoveObserver(this);
-}
-
-net::NetworkChangeNotifier::ConnectionType
-NetworkChangeNotifierChromeos::GetCurrentConnectionType() const {
- return connection_type_;
-}
-
-void NetworkChangeNotifierChromeos::ActiveNetworkChanged(
- const chromeos::NetworkState* active_network) {
- bool connection_type_changed = false;
- bool ip_address_changed = false;
- bool dns_changed = false;
-
- UpdateState(active_network, &connection_type_changed,
- &ip_address_changed, &dns_changed);
-
- if (connection_type_changed)
- NetworkChangeNotifierChromeos:: NotifyObserversOfConnectionTypeChange();
- if (ip_address_changed)
- NetworkChangeNotifierChromeos::NotifyObserversOfIPAddressChange();
- if (dns_changed)
- dns_config_service_->OnNetworkChange();
-}
-
-void NetworkChangeNotifierChromeos::ActiveNetworkStateChanged(
- const chromeos::NetworkState* active_network) {
- ActiveNetworkChanged(active_network);
-}
-
-void NetworkChangeNotifierChromeos::UpdateState(
- const chromeos::NetworkState* active_network,
- bool* connection_type_changed,
- bool* ip_address_changed,
- bool* dns_changed) {
- *connection_type_changed = false;
- *ip_address_changed = false;
- *dns_changed = false;
- // TODO(gauravsh): DNS changes will be detected once ip config
- // support is hooked into NetworkStateHandler. For now,
- // we report a DNS change on changes to the active network (including
- // loss).
- if (!active_network || !active_network->IsConnectedState()) {
- // If we lost an active network, we must update our state and notify
- // observers, otherwise we have nothing do. (Under normal circumstances,
- // we should never get duplicate no active network notifications).
- if (connection_type_ != CONNECTION_NONE) {
- *ip_address_changed = true;
- *dns_changed = true;
- *connection_type_changed = true;
- connection_type_ = CONNECTION_NONE;
- service_path_.clear();
- ip_address_.clear();
- }
- return;
- }
-
- // We do have an active network and it is connected.
- net::NetworkChangeNotifier::ConnectionType new_connection_type =
- ConnectionTypeFromShill(active_network->type(),
- active_network->technology());
- if (new_connection_type != connection_type_) {
- VLOG(1) << "Connection type changed from " << connection_type_ << " -> "
- << new_connection_type;
- *connection_type_changed = true;
- *dns_changed = true;
- }
- if (active_network->path() != service_path_ ||
- active_network->ip_address() != ip_address_) {
- VLOG(1) << "Service path changed from " << service_path_ << " -> "
- << active_network->path();
- VLOG(1) << "IP Address changed from " << ip_address_ << " -> "
- << active_network->ip_address();
- *ip_address_changed = true;
- *dns_changed = true;
- }
- connection_type_ = new_connection_type;
- service_path_ = active_network->path();
- ip_address_ = active_network->ip_address();
-}
-
-// static
-net::NetworkChangeNotifier::ConnectionType
-NetworkChangeNotifierChromeos::ConnectionTypeFromShill(
- const std::string& type, const std::string& technology) {
- if (type == flimflam::kTypeEthernet)
- return CONNECTION_ETHERNET;
- else if (type == flimflam::kTypeWifi)
- return CONNECTION_WIFI;
- else if (type == flimflam::kTypeWimax)
- return CONNECTION_4G;
-
- if (type != flimflam::kTypeCellular)
- return CONNECTION_UNKNOWN;
-
- // For cellular types, mapping depends on the technology.
- if (technology == flimflam::kNetworkTechnologyEvdo ||
- technology == flimflam::kNetworkTechnologyGsm ||
- technology == flimflam::kNetworkTechnologyUmts ||
- technology == flimflam::kNetworkTechnologyHspa) {
- return CONNECTION_3G;
- } else if (technology == flimflam::kNetworkTechnologyHspaPlus ||
- technology == flimflam::kNetworkTechnologyLte ||
- technology == flimflam::kNetworkTechnologyLteAdvanced) {
- return CONNECTION_4G;
- } else {
- return CONNECTION_2G; // Default cellular type is 2G.
- }
-}
-
-// static
-net::NetworkChangeNotifier::NetworkChangeCalculatorParams
-NetworkChangeNotifierChromeos::NetworkChangeCalculatorParamsChromeos() {
- NetworkChangeCalculatorParams params;
- // Delay values arrived at by simple experimentation and adjusted so as to
- // produce a single signal when switching between network connections.
- params.ip_address_offline_delay_ = base::TimeDelta::FromMilliseconds(4000);
- params.ip_address_online_delay_ = base::TimeDelta::FromMilliseconds(1000);
- params.connection_type_offline_delay_ =
- base::TimeDelta::FromMilliseconds(500);
- params.connection_type_online_delay_ = base::TimeDelta::FromMilliseconds(500);
- return params;
-}
-
-} // namespace chromeos
-
diff --git a/chromeos/network/network_change_notifier_chromeos.h b/chromeos/network/network_change_notifier_chromeos.h
deleted file mode 100644
index ca22588..0000000
--- a/chromeos/network/network_change_notifier_chromeos.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2012 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 CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
-#define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/gtest_prod_util.h"
-#include "base/memory/scoped_ptr.h"
-#include "chromeos/chromeos_export.h"
-#include "chromeos/network/network_state_handler_observer.h"
-#include "net/base/network_change_notifier.h"
-
-namespace chromeos {
-
-class CHROMEOS_EXPORT NetworkChangeNotifierChromeos
- : public net::NetworkChangeNotifier,
- public chromeos::NetworkStateHandlerObserver {
- public:
- NetworkChangeNotifierChromeos();
- virtual ~NetworkChangeNotifierChromeos();
-
- // Starts observing changes from the network state handler.
- void Initialize();
-
- // Stops observing changes from the network state handler.
- void Shutdown();
-
- // NetworkChangeNotifier overrides.
- virtual net::NetworkChangeNotifier::ConnectionType
- GetCurrentConnectionType() const OVERRIDE;
-
- // NetworkStateHandlerObserver overrides.
- virtual void ActiveNetworkChanged(
- const chromeos::NetworkState* active_network) OVERRIDE;
- virtual void ActiveNetworkStateChanged(
- const chromeos::NetworkState* active_network) OVERRIDE;
-
- private:
- FRIEND_TEST_ALL_PREFIXES(NetworkChangeNotifierChromeosTest,
- ConnectionTypeFromShill);
- friend class NetworkChangeNotifierChromeosUpdateTest;
-
- class DnsConfigService;
-
- // Updates the notifier state based on an active network update.
- // |connection_type_changed| is set to true if we must report a connection
- // type change.
- // |ip_address_changed| is set to true if we must report an IP address change.
- // |dns_changed| is set to true if we must report a DNS config change.
- void UpdateState(const chromeos::NetworkState* active_network,
- bool* connection_type_changed,
- bool* ip_address_changed,
- bool* dns_changed);
-
- // Maps the shill network type and technology to its NetworkChangeNotifier
- // equivalent.
- static net::NetworkChangeNotifier::ConnectionType
- ConnectionTypeFromShill(const std::string& type,
- const std::string& technology);
-
- // Calculates parameters used for network change notifier online/offline
- // signals.
- static net::NetworkChangeNotifier::NetworkChangeCalculatorParams
- NetworkChangeCalculatorParamsChromeos();
-
- NetworkChangeNotifier::ConnectionType connection_type_;
- // IP address for the current active network.
- std::string ip_address_;
- // Service path for the current active network.
- std::string service_path_;
-
- scoped_ptr<DnsConfigService> dns_config_service_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos);
-};
-
-} // namespace chromeos
-
-#endif // CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_
diff --git a/chromeos/network/network_change_notifier_chromeos_unittest.cc b/chromeos/network/network_change_notifier_chromeos_unittest.cc
deleted file mode 100644
index 9995e49..0000000
--- a/chromeos/network/network_change_notifier_chromeos_unittest.cc
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "chromeos/network/network_change_notifier_chromeos.h"
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "chromeos/network/network_change_notifier_factory_chromeos.h"
-#include "chromeos/network/network_state.h"
-#include "net/base/network_change_notifier.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/cros_system_api/dbus/service_constants.h"
-
-namespace chromeos {
-
-using net::NetworkChangeNotifier;
-
-TEST(NetworkChangeNotifierChromeosTest, ConnectionTypeFromShill) {
- struct TypeMapping {
- const char* shill_type;
- const char* technology;
- NetworkChangeNotifier::ConnectionType connection_type;
- };
- TypeMapping type_mappings[] = {
- { flimflam::kTypeEthernet, "", NetworkChangeNotifier::CONNECTION_ETHERNET },
- { flimflam::kTypeWifi, "", NetworkChangeNotifier::CONNECTION_WIFI },
- { flimflam::kTypeWimax, "", NetworkChangeNotifier::CONNECTION_4G },
- { "unknown type", "unknown technology",
- NetworkChangeNotifier::CONNECTION_UNKNOWN },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnology1Xrtt,
- NetworkChangeNotifier::CONNECTION_2G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyGprs,
- NetworkChangeNotifier::CONNECTION_2G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyEdge,
- NetworkChangeNotifier::CONNECTION_2G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyEvdo,
- NetworkChangeNotifier::CONNECTION_3G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyGsm,
- NetworkChangeNotifier::CONNECTION_3G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyUmts,
- NetworkChangeNotifier::CONNECTION_3G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyHspa,
- NetworkChangeNotifier::CONNECTION_3G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyHspaPlus,
- NetworkChangeNotifier::CONNECTION_4G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyLte,
- NetworkChangeNotifier::CONNECTION_4G },
- { flimflam::kTypeCellular, flimflam::kNetworkTechnologyLteAdvanced,
- NetworkChangeNotifier::CONNECTION_4G },
- { flimflam::kTypeCellular, "unknown technology",
- NetworkChangeNotifier::CONNECTION_2G }
- };
-
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(type_mappings); ++i) {
- NetworkChangeNotifier::ConnectionType type =
- NetworkChangeNotifierChromeos::ConnectionTypeFromShill(
- type_mappings[i].shill_type, type_mappings[i].technology);
- EXPECT_EQ(type_mappings[i].connection_type, type);
- }
-}
-
-class NetworkChangeNotifierChromeosUpdateTest : public testing::Test {
- protected:
- NetworkChangeNotifierChromeosUpdateTest() : active_network_("") {
- }
- virtual ~NetworkChangeNotifierChromeosUpdateTest() {}
-
- void SetNotifierState(NetworkChangeNotifier::ConnectionType type,
- std::string service_path,
- std::string ip_address) {
- notifier_.ip_address_ = ip_address;
- notifier_.service_path_ = service_path;
- notifier_.connection_type_ = type;
- }
-
- void VerifyNotifierState(NetworkChangeNotifier::ConnectionType expected_type,
- std::string expected_service_path,
- std::string expected_ip_address) {
- EXPECT_EQ(expected_type, notifier_.connection_type_);
- EXPECT_EQ(expected_ip_address, notifier_.ip_address_);
- EXPECT_EQ(expected_service_path, notifier_.service_path_);
- }
-
- // Sets the active network state used for notifier updates.
- void SetActiveNetworkState(bool is_connected,
- std::string type,
- std::string technology,
- std::string service_path,
- std::string ip_address) {
- if (is_connected)
- active_network_.state_ = flimflam::kStateOnline;
- else
- active_network_.state_ = flimflam::kStateConfiguration;
- active_network_.type_ = type;
- active_network_.technology_ = technology;
- active_network_.path_ = service_path;
- active_network_.ip_address_ = ip_address;
- }
-
- // Process an active network update based on the state of |active_network_|.
- void ProcessActiveNetworkUpdate(bool* type_changed,
- bool* ip_changed,
- bool* dns_changed) {
- notifier_.UpdateState(&active_network_, type_changed, ip_changed,
- dns_changed);
- }
-
- private:
- NetworkState active_network_;
- NetworkChangeNotifierChromeos notifier_;
-};
-
-TEST_F(NetworkChangeNotifierChromeosUpdateTest, UpdateActiveNetworkOffline) {
- // Test that Online to Offline transitions are correctly handled.
- SetNotifierState(NetworkChangeNotifier::CONNECTION_ETHERNET, "/service/1",
- "192.168.1.1");
- SetActiveNetworkState(false, // offline.
- flimflam::kTypeEthernet, "", "/service/1", "");
- bool type_changed = false, ip_changed = false, dns_changed = false;
- ProcessActiveNetworkUpdate(&type_changed, &ip_changed, &dns_changed);
- VerifyNotifierState(NetworkChangeNotifier::CONNECTION_NONE, "", "");
- EXPECT_TRUE(type_changed);
- EXPECT_TRUE(ip_changed);
- EXPECT_TRUE(dns_changed);
-}
-
-TEST_F(NetworkChangeNotifierChromeosUpdateTest, UpdateActiveNetworkOnline) {
- // Test that Offline to Online transitions are correctly handled.
- SetNotifierState(NetworkChangeNotifier::CONNECTION_NONE, "", "");
-
- SetActiveNetworkState(false, // offline.
- flimflam::kTypeEthernet, "",
- "192.168.0.1", "/service/1");
- bool type_changed = false, ip_changed = false, dns_changed = false;
- ProcessActiveNetworkUpdate(&type_changed, &ip_changed, &dns_changed);
- // If the new active network is still offline, nothing should have changed.
- VerifyNotifierState(NetworkChangeNotifier::CONNECTION_NONE, "", "");
- EXPECT_FALSE(type_changed);
- EXPECT_FALSE(ip_changed);
- EXPECT_FALSE(dns_changed);
-
- SetActiveNetworkState(true, // online.
- flimflam::kTypeEthernet, "", "/service/1",
- "192.168.0.1");
- ProcessActiveNetworkUpdate(&type_changed, &ip_changed, &dns_changed);
- // Now the new active network is online, so this should trigger a notifier
- // state change.
- VerifyNotifierState(NetworkChangeNotifier::CONNECTION_ETHERNET, "/service/1",
- "192.168.0.1");
- EXPECT_TRUE(type_changed);
- EXPECT_TRUE(ip_changed);
- EXPECT_TRUE(dns_changed);
-}
-
-TEST_F(NetworkChangeNotifierChromeosUpdateTest, UpdateActiveNetworkChanged) {
- // Test that Online to Online transisions (active network changes) are
- // correctly handled.
- SetNotifierState(NetworkChangeNotifier::CONNECTION_ETHERNET, "/service/1",
- "192.168.1.1");
-
- SetActiveNetworkState(true, // online.
- flimflam::kTypeWifi, "", "/service/2", "192.168.1.2");
- bool type_changed = false, ip_changed = false, dns_changed = false;
- ProcessActiveNetworkUpdate(&type_changed, &ip_changed, &dns_changed);
- VerifyNotifierState(NetworkChangeNotifier::CONNECTION_WIFI, "/service/2",
- "192.168.1.2" );
- EXPECT_TRUE(type_changed);
- EXPECT_TRUE(ip_changed);
- EXPECT_TRUE(dns_changed);
-
- SetActiveNetworkState(true, // online.
- flimflam::kTypeWifi, "", "/service/3", "192.168.1.2");
- ProcessActiveNetworkUpdate(&type_changed, &ip_changed, &dns_changed);
- VerifyNotifierState(NetworkChangeNotifier::CONNECTION_WIFI, "/service/3",
- "192.168.1.2" );
- EXPECT_FALSE(type_changed);
- // A service path change (even with a corresponding IP change) should still
- // trigger an IP address update to observers.
- EXPECT_TRUE(ip_changed);
- EXPECT_TRUE(dns_changed);
-}
-
-} // namespace chromeos
diff --git a/chromeos/network/network_change_notifier_factory_chromeos.cc b/chromeos/network/network_change_notifier_factory_chromeos.cc
deleted file mode 100644
index 1d73c3e..0000000
--- a/chromeos/network/network_change_notifier_factory_chromeos.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "chromeos/network/network_change_notifier_factory_chromeos.h"
-
-#include "chromeos/network/network_change_notifier_chromeos.h"
-
-namespace chromeos {
-
-namespace {
-
-NetworkChangeNotifierChromeos* g_network_change_notifier_chromeos = NULL;
-
-} // namespace
-
-net::NetworkChangeNotifier*
-NetworkChangeNotifierFactoryChromeos::CreateInstance() {
- DCHECK(!g_network_change_notifier_chromeos);
- g_network_change_notifier_chromeos = new NetworkChangeNotifierChromeos();
- return g_network_change_notifier_chromeos;
-}
-
-// static
-NetworkChangeNotifierChromeos*
-NetworkChangeNotifierFactoryChromeos::GetInstance() {
- return g_network_change_notifier_chromeos;
-}
-
-} // namespace chromeos
diff --git a/chromeos/network/network_change_notifier_factory_chromeos.h b/chromeos/network/network_change_notifier_factory_chromeos.h
deleted file mode 100644
index 51366da..0000000
--- a/chromeos/network/network_change_notifier_factory_chromeos.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2012 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 CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_FACTORY_CHROMEOS_H_
-#define CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_FACTORY_CHROMEOS_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "chromeos/chromeos_export.h"
-#include "net/base/network_change_notifier_factory.h"
-
-namespace chromeos {
-
-class NetworkChangeNotifierChromeos;
-
-class CHROMEOS_EXPORT NetworkChangeNotifierFactoryChromeos
- : public net::NetworkChangeNotifierFactory {
- public:
- NetworkChangeNotifierFactoryChromeos() {}
-
- // net::NetworkChangeNotifierFactory overrides.
- virtual net::NetworkChangeNotifier* CreateInstance() OVERRIDE;
-
- static NetworkChangeNotifierChromeos* GetInstance();
-};
-
-} // namespace chromeos
-
-#endif // CHROMEOS_NETWORK_NETWORK_CHANGE_NOTIFIER_FACTORY_CHROMEOS_H_
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 30228f8..c5fa66d 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -43,7 +43,6 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
private:
friend class NetworkStateHandler;
- friend class NetworkChangeNotifierChromeosUpdateTest;
// Called by NetworkStateHandler when the ip config changes.
void set_ip_address(const std::string& ip_address) {