summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 22:21:11 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 22:21:11 +0000
commit1172ba7af32d7756a138b2f5d4761cb8d566f29c (patch)
treec3623ce6a47f09e08f664ed961eb28a654dd4d12 /chrome/browser/browser_main.cc
parentf1c74ecbdfbe62d62668bdbeb7639284f0b455f4 (diff)
downloadchromium_src-1172ba7af32d7756a138b2f5d4761cb8d566f29c.zip
chromium_src-1172ba7af32d7756a138b2f5d4761cb8d566f29c.tar.gz
chromium_src-1172ba7af32d7756a138b2f5d4761cb8d566f29c.tar.bz2
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
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc15
1 files changed, 8 insertions, 7 deletions
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)