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

Unified Diff: chrome/browser/browser_main.cc

Issue 6990003: Make Chrome built for Chrome OS works on Linux with --stub-cros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 6148e0c553444f458564ba16b6ffa6cd28d2f1c1..46d7efcca2d0e6c6832563be5fbe02f5c98eba89 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1201,6 +1201,14 @@ int BrowserMain(const MainFunctionParams& parameters) {
// Must happen before we try to use a message loop or display any UI.
InitializeToolkit(parameters);
+#if defined(OS_CHROMEOS)
+ // Stub out chromeos implementations. We need to do as early as possible
+ // because it is initialized on first use when it is initialized
+ // SetUseStubImpl doesn't do anything.
+ if (parameters.command_line_.HasSwitch(switches::kStubCros))
+ chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl();
+#endif
+
parts->MainMessageLoopStart();
// WARNING: If we get a WM_ENDSESSION, objects created on the stack here
@@ -1530,10 +1538,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
// Profile creation ----------------------------------------------------------
#if defined(OS_CHROMEOS)
- // Stub out chromeos implementations.
- if (parsed_command_line.HasSwitch(switches::kStubCros))
- chromeos::CrosLibrary::Get()->GetTestApi()->SetUseStubImpl();
-
// Initialize the screen locker now so that it can receive
// LOGIN_USER_CHANGED notification from UserManager.
chromeos::ScreenLocker::InitClass();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698