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

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

Issue 11318008: cros: Allow default app order to be loaded from an external file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698