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 5446a3e87f62c454df2808cb6cf2024052010e50..f140e49f171fc82a7cfb84dc294a557519556759 100644 |
| --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
| +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc |
| @@ -25,6 +25,7 @@ |
| #include "chrome/browser/chromeos/display/display_preferences.h" |
| #include "chrome/browser/chromeos/display/primary_display_switch_observer.h" |
| #include "chrome/browser/chromeos/external_metrics.h" |
| +#include "chrome/browser/chromeos/extensions/default_app_order.h" |
| #include "chrome/browser/chromeos/imageburner/burn_manager.h" |
| #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| @@ -329,6 +330,7 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { |
| void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
| chromeos::AudioHandler::Initialize(); |
| chromeos::imageburner::BurnManager::Initialize(); |
| + app_order_loader_.reset(new chromeos::default_app_order::ExternalLoader); |
| // Listen for system key events so that the user will be able to adjust the |
| // volume on the login screen, if Chrome is running on Chrome OS |
| @@ -399,6 +401,13 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() { |
| g_browser_process->browser_policy_connector()->InitializeUserPolicy( |
| username, false /* wait_for_policy_fetch */); |
| } |
| + |
| + // Ensures the default app order is loaded before profile load. |
| + // This is only needed for user already signed-in case. In normal |
| + // chromeos session, the loading happens asynchronously and should be |
| + // finished before user signs in. |
| + app_order_loader_->WaitForLoad(); |
|
tbarzic
2012/10/26 21:56:28
Is there any way to get rid of this?
looks so ugly
xiyuan
2012/10/26 22:39:25
I removed the wait call but we still have to do a
|
| + |
| chromeos::UserManager::Get()->SessionStarted(); |
| } |