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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 22264004: Remove ConnectivityStateHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove redundant IsConnected() check Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index e87caf6bcb041091ee9e21464330b4101cec6d7a..d6a251eb0f3910aa5af6532bf0f5e32a12d286e3 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/contacts/contact_manager.h"
#include "chrome/browser/chromeos/cros/cert_library.h"
+#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
#include "chrome/browser/chromeos/display/display_configuration_observer.h"
#include "chrome/browser/chromeos/extensions/default_app_order.h"
@@ -51,9 +52,6 @@
#include "chrome/browser/chromeos/login/wallpaper_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/memory/oom_priority_manager.h"
-#include "chrome/browser/chromeos/net/connectivity_state_helper.h"
-#include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h"
-#include "chrome/browser/chromeos/net/network_change_notifier_network_library.h"
#include "chrome/browser/chromeos/net/network_portal_detector.h"
#include "chrome/browser/chromeos/power/brightness_observer.h"
#include "chrome/browser/chromeos/power/idle_action_warning_observer.h"
@@ -303,12 +301,7 @@ class DBusServices {
// Initialize the network change notifier for Chrome OS. The network
// change notifier starts to monitor changes from the power manager and
// the network manager.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kDisableNewNetworkChangeNotifier)) {
- NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
- } else {
- CrosNetworkChangeNotifierFactory::GetInstance()->Init();
- }
+ NetworkChangeNotifierFactoryChromeos::GetInstance()->Initialize();
// Likewise, initialize the upgrade detector for Chrome OS. The upgrade
// detector starts to monitor changes from the update engine.
@@ -327,12 +320,9 @@ class DBusServices {
DeviceSettingsService::Get()->SetSessionManager(
DBusThreadManager::Get()->GetSessionManagerClient(),
OwnerKeyUtil::Create());
- ConnectivityStateHelper::Initialize();
}
~DBusServices() {
- ConnectivityStateHelper::Shutdown();
-
CertLibrary::Shutdown();
NetworkHandler::Shutdown();
if (network_library_initialized_)
@@ -418,18 +408,8 @@ void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() {
// Replace the default NetworkChangeNotifierFactory with ChromeOS specific
// implementation. This must be done before BrowserMainLoop calls
// net::NetworkChangeNotifier::Create() in MainMessageLoopStart().
- net::NetworkChangeNotifierFactory* network_change_factory;
- // Note: At the time this is called, we have not processed about:flags
- // so this requires that the network handler flag was passed in at the command
- // line.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kDisableNewNetworkChangeNotifier)) {
- LOG(WARNING) << "Using new connection change notifier.";
- network_change_factory = new NetworkChangeNotifierFactoryChromeos();
- } else {
- network_change_factory = new CrosNetworkChangeNotifierFactory();
- }
- net::NetworkChangeNotifier::SetFactory(network_change_factory);
+ net::NetworkChangeNotifier::SetFactory(
+ new NetworkChangeNotifierFactoryChromeos());
ChromeBrowserMainPartsLinux::PreMainMessageLoopStart();
}
@@ -740,8 +720,6 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
// Shutdown the network change notifier for Chrome OS. The network
// change notifier stops monitoring changes from the power manager and
// the network manager.
- if (CrosNetworkChangeNotifierFactory::GetInstance())
- CrosNetworkChangeNotifierFactory::GetInstance()->Shutdown();
if (NetworkChangeNotifierFactoryChromeos::GetInstance())
NetworkChangeNotifierFactoryChromeos::GetInstance()->Shutdown();
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698