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

Unified Diff: chromecast/app/cast_main_delegate.cc

Issue 1311493002: [Chromecast] ATV: don't include logs from renderer process in logfile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/app/cast_main_delegate.cc
diff --git a/chromecast/app/cast_main_delegate.cc b/chromecast/app/cast_main_delegate.cc
index f28ef11ec8217588d95b0fc7163c6cf7c1702a81..768a0bca23baecbc3a08dd3b2d785aaa2d4eac04 100644
--- a/chromecast/app/cast_main_delegate.cc
+++ b/chromecast/app/cast_main_delegate.cc
@@ -61,20 +61,19 @@ bool CastMainDelegate::BasicStartupComplete(int* exit_code) {
RegisterPathProvider();
logging::LoggingSettings settings;
+ settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
#if defined(OS_ANDROID)
- base::FilePath log_file;
- PathService::Get(FILE_CAST_ANDROID_LOG, &log_file);
- settings.logging_dest = logging::LOG_TO_ALL;
- settings.log_file = log_file.value().c_str();
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
- // Only delete the old logs if the current process is the browser process.
- // Empty process_type signifies browser process.
- settings.delete_old = process_type.empty() ? logging::DELETE_OLD_LOG_FILE
- : logging::APPEND_TO_OLD_LOG_FILE;
-#else
- settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
+ // Browser process logs are recorded for attaching with crash dumps.
+ if (process_type.empty()) {
slan 2015/08/21 20:12:14 Could we add a note about permissions explaining w
+ base::FilePath log_file;
+ PathService::Get(FILE_CAST_ANDROID_LOG, &log_file);
+ settings.logging_dest = logging::LOG_TO_ALL;
+ settings.log_file = log_file.value().c_str();
+ settings.delete_old = logging::DELETE_OLD_LOG_FILE;
+ }
#endif // defined(OS_ANDROID)
logging::InitLogging(settings);
// Time, process, and thread ID are available through logcat.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698