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

Side by Side Diff: chrome/browser/browser_main.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/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 // 2) if passed alone, to signal that the indicated user has already 1216 // 2) if passed alone, to signal that the indicated user has already
1217 // logged in and we should behave accordingly. 1217 // logged in and we should behave accordingly.
1218 // This handles case 2. 1218 // This handles case 2.
1219 if (parsed_command_line.HasSwitch(switches::kLoginUser) && 1219 if (parsed_command_line.HasSwitch(switches::kLoginUser) &&
1220 !parsed_command_line.HasSwitch(switches::kLoginPassword)) { 1220 !parsed_command_line.HasSwitch(switches::kLoginPassword)) {
1221 std::string username = 1221 std::string username =
1222 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser); 1222 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser);
1223 VLOG(1) << "Relaunching browser for user: " << username; 1223 VLOG(1) << "Relaunching browser for user: " << username;
1224 chromeos::UserManager::Get()->UserLoggedIn(username); 1224 chromeos::UserManager::Get()->UserLoggedIn(username);
1225 1225
1226 // Redirect logs. 1226 // Redirects Chrome logging to the user data dir.
1227 FilePath user_data_dir; 1227 logging::RedirectChromeLogging(parsed_command_line);
1228 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
1229 ProfileManager* profile_manager = g_browser_process->profile_manager();
1230 // The default profile will have been changed because the ProfileManager
1231 // will process the notification that the UserManager sends out.
1232
1233 logging::RedirectChromeLogging(
1234 user_data_dir.Append(profile_manager->GetCurrentProfileDir()),
1235 *(CommandLine::ForCurrentProcess()));
1236 } 1228 }
1237 #endif 1229 #endif
1238 1230
1239 // Modifies the current command line based on active experiments on 1231 // Modifies the current command line based on active experiments on
1240 // about:flags. 1232 // about:flags.
1241 Profile* profile = CreateProfile(parameters, user_data_dir); 1233 Profile* profile = CreateProfile(parameters, user_data_dir);
1242 if (!profile) 1234 if (!profile)
1243 return ResultCodes::NORMAL_EXIT; 1235 return ResultCodes::NORMAL_EXIT;
1244 1236
1245 // Post-profile init --------------------------------------------------------- 1237 // Post-profile init ---------------------------------------------------------
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 metrics->Stop(); 1564 metrics->Stop();
1573 1565
1574 // browser_shutdown takes care of deleting browser_process, so we need to 1566 // browser_shutdown takes care of deleting browser_process, so we need to
1575 // release it. 1567 // release it.
1576 ignore_result(browser_process.release()); 1568 ignore_result(browser_process.release());
1577 browser_shutdown::Shutdown(); 1569 browser_shutdown::Shutdown();
1578 1570
1579 TRACE_EVENT_END("BrowserMain", 0, 0); 1571 TRACE_EVENT_END("BrowserMain", 0, 0);
1580 return result_code; 1572 return result_code;
1581 } 1573 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | chrome/test/in_process_browser_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698