From 1172ba7af32d7756a138b2f5d4761cb8d566f29c Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Fri, 21 May 2010 22:21:11 +0000 Subject: Ensure that the default profile for cros has no extension service BUG=chromeium-os:3232 TEST=LoginProfileTest.UserNotPassed Review URL: http://codereview.chromium.org/2094018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47959 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_main.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'chrome/browser/browser_main.cc') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index acc4525..6b7d540 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -1018,10 +1018,9 @@ int BrowserMain(const MainFunctionParams& parameters) { // Profile creation ---------------------------------------------------------- #if defined(OS_CHROMEOS) - // todo(davemoore) this is a hack to get the ProfileManager to register - // for the user logged in notification before we send it. This needs to be - // redone in a cleaner way. - ProfileManager::GetDefaultProfile(); + // This forces the ProfileManager to be created and register for the + // notification it needs to track the logged in user. + g_browser_process->profile_manager()->GetDefaultProfile(); if (parsed_command_line.HasSwitch(switches::kLoginUser)) { std::string username = @@ -1223,9 +1222,11 @@ int BrowserMain(const MainFunctionParams& parameters) { metrics->StartExternalMetrics(); #endif - // This will initialize bookmarks. Call it after bookmark import is done. - // See issue 40144. - profile->GetExtensionsService()->InitEventRouters(); + if (profile->GetExtensionsService()) { + // This will initialize bookmarks. Call it after bookmark import is done. + // See issue 40144. + profile->GetExtensionsService()->InitEventRouters(); + } #if defined(OS_WIN) // We check this here because if the profile is OTR (chromeos possibility) -- cgit v1.1