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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 4194005: This moves log output for ChromeOS to safer locations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload after sync Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/lock.h" 10 #include "base/lock.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool first_login = !UserManager::Get()->IsKnownUser(username); 136 bool first_login = !UserManager::Get()->IsKnownUser(username);
137 UserManager::Get()->UserLoggedIn(username); 137 UserManager::Get()->UserLoggedIn(username);
138 btl->AddLoginTimeMarker("UserLoggedIn", false); 138 btl->AddLoginTimeMarker("UserLoggedIn", false);
139 139
140 // Now get the new profile. 140 // Now get the new profile.
141 FilePath user_data_dir; 141 FilePath user_data_dir;
142 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 142 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
143 ProfileManager* profile_manager = g_browser_process->profile_manager(); 143 ProfileManager* profile_manager = g_browser_process->profile_manager();
144 144
145 // Switch log file as soon as possible. 145 // Switch log file as soon as possible.
146 logging::RedirectChromeLogging( 146 logging::RedirectChromeLogging(*(CommandLine::ForCurrentProcess()));
147 user_data_dir.Append(profile_manager->GetCurrentProfileDir()),
148 *(CommandLine::ForCurrentProcess()));
149 btl->AddLoginTimeMarker("LoggingRedirected", false); 147 btl->AddLoginTimeMarker("LoggingRedirected", false);
150 148
151 // The default profile will have been changed because the ProfileManager 149 // The default profile will have been changed because the ProfileManager
152 // will process the notification that the UserManager sends out. 150 // will process the notification that the UserManager sends out.
153 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); 151 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
154 btl->AddLoginTimeMarker("UserProfileGotten", false); 152 btl->AddLoginTimeMarker("UserProfileGotten", false);
155 153
156 // Take the credentials passed in and try to exchange them for 154 // Take the credentials passed in and try to exchange them for
157 // full-fledged Google authentication cookies. This is 155 // full-fledged Google authentication cookies. This is
158 // best-effort; it's possible that we'll fail due to network 156 // best-effort; it's possible that we'll fail due to network
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 BrowserInit browser_init; 350 BrowserInit browser_init;
353 int return_code; 351 int return_code;
354 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(), 352 browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(),
355 profile, 353 profile,
356 FilePath(), 354 FilePath(),
357 true, 355 true,
358 &return_code); 356 &return_code);
359 } 357 }
360 358
361 } // namespace chromeos 359 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698