Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 // Need to include this before most other files because it defines | 7 // Need to include this before most other files because it defines |
| 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
| 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the | 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the |
| 10 // ViewMsgLog et al. functions. | 10 // ViewMsgLog et al. functions. |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 std::string profile_dir_str = chrome::kProfileDirPrefix; | 217 std::string profile_dir_str = chrome::kProfileDirPrefix; |
| 218 profile_dir_str.append(login_profile_value); | 218 profile_dir_str.append(login_profile_value); |
| 219 profile_dir = base::FilePath(profile_dir_str); | 219 profile_dir = base::FilePath(profile_dir_str); |
| 220 } | 220 } |
| 221 log_dir = log_dir.Append(profile_dir); | 221 log_dir = log_dir.Append(profile_dir); |
| 222 } | 222 } |
| 223 return log_dir.Append(GetLogFileName().BaseName()); | 223 return log_dir.Append(GetLogFileName().BaseName()); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void RedirectChromeLogging(const CommandLine& command_line) { | 226 void RedirectChromeLogging(const CommandLine& command_line) { |
| 227 // TODO(skuhne): Find another way to see if multi profile is turned on or not | |
| 228 // since profiles::IsMultiProfilesEnabled() cannot be called from here. | |
| 227 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles) && | 229 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles) && |
|
Mr4D (OOO till 08-26)
2014/05/14 16:32:40
We should resolve this one - or remove it. The fla
zel
2014/05/14 17:48:39
Done.
| |
| 228 chrome_logging_redirected_) { | 230 chrome_logging_redirected_) { |
| 229 // TODO(nkostylev): Support multiple active users. http://crbug.com/230345 | 231 // TODO(nkostylev): Support multiple active users. http://crbug.com/230345 |
| 230 LOG(ERROR) << "NOT redirecting logging for multi-profiles case."; | 232 LOG(ERROR) << "NOT redirecting logging for multi-profiles case."; |
| 231 return; | 233 return; |
| 232 } | 234 } |
| 233 | 235 |
| 234 DCHECK(!chrome_logging_redirected_) << | 236 DCHECK(!chrome_logging_redirected_) << |
| 235 "Attempted to redirect logging when it was already initialized."; | 237 "Attempted to redirect logging when it was already initialized."; |
| 236 | 238 |
| 237 // Redirect logs to the session log directory, if set. Otherwise | 239 // Redirect logs to the session log directory, if set. Otherwise |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 time_deets.year, | 442 time_deets.year, |
| 441 time_deets.month, | 443 time_deets.month, |
| 442 time_deets.day_of_month, | 444 time_deets.day_of_month, |
| 443 time_deets.hour, | 445 time_deets.hour, |
| 444 time_deets.minute, | 446 time_deets.minute, |
| 445 time_deets.second); | 447 time_deets.second); |
| 446 return base_path.InsertBeforeExtensionASCII(suffix); | 448 return base_path.InsertBeforeExtensionASCII(suffix); |
| 447 } | 449 } |
| 448 | 450 |
| 449 } // namespace logging | 451 } // namespace logging |
| OLD | NEW |