summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 07:44:43 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 07:44:43 +0000
commitf6e74bde05e0ebbfd713585b8724e608b6011a08 (patch)
tree8916909083ac32b9d72e8427f514b9b2f186788f /chrome/browser/chromeos
parenta3ded6d49e31e7b03926e30ee04bdb74a622ca9a (diff)
downloadchromium_src-f6e74bde05e0ebbfd713585b8724e608b6011a08.zip
chromium_src-f6e74bde05e0ebbfd713585b8724e608b6011a08.tar.gz
chromium_src-f6e74bde05e0ebbfd713585b8724e608b6011a08.tar.bz2
Switch system logs on user log earlier
to show extension initialization in user log BUG=none TEST=manual Review URL: http://codereview.chromium.org/3787009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 234ed21..6a929d2 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -131,6 +131,13 @@ void LoginUtilsImpl::CompleteLogin(const std::string& username,
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
ProfileManager* profile_manager = g_browser_process->profile_manager();
+
+ // Switch log file as soon as possible.
+ logging::RedirectChromeLogging(
+ user_data_dir.Append(profile_manager->GetCurrentProfileDir()),
+ *(CommandLine::ForCurrentProcess()),
+ logging::DELETE_OLD_LOG_FILE);
+
// The default profile will have been changed because the ProfileManager
// will process the notification that the UserManager sends out.
Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
@@ -143,11 +150,6 @@ void LoginUtilsImpl::CompleteLogin(const std::string& username,
profile->GetExtensionsService()->InitEventRouters();
}
- logging::RedirectChromeLogging(
- user_data_dir.Append(profile_manager->GetCurrentProfileDir()),
- *(CommandLine::ForCurrentProcess()),
- logging::DELETE_OLD_LOG_FILE);
-
// Supply credentials for sync and others to use. Load tokens from disk.
TokenService* token_service = profile->GetTokenService();
token_service->Initialize(GaiaConstants::kChromeOSSource,