Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index ab2b807298bf7ffbff46d8103dc8639f3b0c8906..2fd9c4dd4c78a881295aaef2ade897698b76daac 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -200,6 +200,7 @@ |
#endif |
#if defined(USE_AURA) |
+#include "chrome/browser/chrome_browser_parts_aura.h" |
#include "ui/aura/desktop.h" |
#endif |
@@ -558,13 +559,6 @@ void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, |
} |
} |
-#else |
- |
-void OptionallyRunChromeOSLoginManager(const CommandLine& parsed_command_line, |
- Profile* profile) { |
- // Dummy empty function for non-ChromeOS builds to avoid extra ifdefs below. |
-} |
- |
#endif // defined(OS_CHROMEOS) |
#if defined(OS_MACOSX) |
@@ -1505,6 +1499,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
SetBrowserX11ErrorHandlers(); |
#endif |
+ // TODO(stevenjb): Move this into a chrome specific stage. |
+#if defined(USE_AURA) |
+ ChromeBrowserPartsAura::SetupDesktop(); |
+#elif defined(TOOLKIT_VIEWS) |
+ ChromeBrowserPartsViews::SetupDesktop(); |
+#endif |
+ |
// Profile creation ---------------------------------------------------------- |
#if defined(OS_CHROMEOS) |
@@ -1570,6 +1571,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
g_browser_process->browser_policy_connector()->SetUserPolicyTokenService( |
profile_->GetTokenService()); |
} |
+ |
+ // Tests should be able to tune login manager before showing it. |
+ // Thus only show login manager in normal (non-testing) mode. |
+ if (!parameters().ui_task) |
+ OptionallyRunChromeOSLoginManager(parsed_command_line(), profile_); |
#endif |
#if !defined(OS_MACOSX) |
@@ -1852,16 +1858,6 @@ void ChromeBrowserMainParts::StartBrowserOrUITask() { |
// Still initializing, so need to allow IO. |
base::ThreadRestrictions::ScopedAllowIO allow_io; |
- // Set the notification UI manager after any desktop initialization in |
- // PreMainMessageLoopRun() is complete, and before starting the browser. |
- DesktopNotificationServiceFactory::GetForProfile(profile_)->SetUIManager( |
- g_browser_process->notification_ui_manager()); |
- |
- // Tests should be able to tune login manager before showing it. |
- // Thus only show login manager in normal (non-testing) mode. |
- if (!parameters().ui_task) |
- OptionallyRunChromeOSLoginManager(parsed_command_line(), profile_); |
- |
if (parameters().ui_task) { |
// We are in test mode. Run one task and enter the main message loop. |
#if defined(OS_MACOSX) |