Chromium Code Reviews| 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 2ea3c8884c29f2c057765e76f010afb479650a2d..43cfa7425825aebab9a0153306ae9fdaa049c071 100644 |
| --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
| +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
| @@ -14,6 +14,7 @@ |
| #include "chrome/browser/chromeos/brightness_observer.h" |
| #include "chrome/browser/chromeos/cros/cros_library.h" |
| #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| +#include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
| #include "chrome/browser/chromeos/login/session_manager_observer.h" |
| #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" |
| @@ -121,10 +122,6 @@ void ChromeBrowserMainPartsChromeos::PreMainMessageLoopStart() { |
| bool use_stub = parameters().command_line.HasSwitch(switches::kStubCros); |
| chromeos::CrosLibrary::Initialize(use_stub); |
| } |
| - // Replace the default NetworkChangeNotifierFactory with ChromeOS specific |
| - // implementation. |
| - net::NetworkChangeNotifier::SetFactory( |
| - new chromeos::CrosNetworkChangeNotifierFactory()); |
| } |
| void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
| @@ -144,11 +141,17 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { |
| // the main message loop is started, as it uses the message loop. |
| chromeos::DBusThreadManager::Initialize(); |
| + // Replace the default NetworkChangeNotifierFactory with ChromeOS specific |
| + // implementation. This should be done after DBusThreadManager init. |
| + net::NetworkChangeNotifier::SetFactory( |
| + new chromeos::CrosNetworkChangeNotifierFactory()); |
|
satorux1
2011/11/03 23:38:47
Please move this back to the original place. We no
Simon Que
2011/11/04 22:35:31
Done.
|
| + |
| // Initialize the brightness observer so that we'll display an onscreen |
| - // indication of brightness changes during login. |
| + // indication of brightness changes. |
| brightness_observer_.reset(new chromeos::BrightnessObserver()); |
| chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver( |
| brightness_observer_.get()); |
| + |
| // Initialize the session manager observer so that we'll take actions |
| // per signals sent from the session manager. |
| session_manager_observer_.reset(new chromeos::SessionManagerObserver); |