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 2e676f4e4ba31a10d3399f2f646549a46cf0d4b3..91d28b963468a824fec02c153134778756bf491f 100644 |
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
@@ -143,6 +143,16 @@ void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
// Get the statistics provider instance here to start loading statistcs |
// on the background FILE thread. |
chromeos::system::StatisticsProvider::GetInstance(); |
+ |
+ // Initialize the Chrome OS bluetooth subsystem. |
+ // We defer this to PreMainMessageLoopRun because we don't want to check the |
+ // parsed command line until after about_flags::ConvertFlagsToSwitches has |
+ // been called. |
+ // TODO(vlaviano): Move this back to PostMainMessageLoopStart when we remove |
+ // the --enable-bluetooth flag. |
+ if (parsed_command_line().HasSwitch(switches::kEnableBluetooth)) { |
+ chromeos::BluetoothManager::Initialize(); |
+ } |
} |
void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { |
@@ -165,11 +175,6 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { |
chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
AddObserver(session_manager_observer_.get()); |
- // Initialize the Chrome OS bluetooth subsystem |
- if (parsed_command_line().HasSwitch(switches::kEnableBluetooth)) { |
- chromeos::BluetoothManager::Initialize(); |
- } |
- |
// Initialize the network change notifier for Chrome OS. The network |
// change notifier starts to monitor changes from the power manager and |
// the network manager. |