Commit 279874b4 authored by achuith's avatar achuith Committed by Commit Bot

Add a switch to prevent logging redirection on chromeos.

This switch will be used by telemetry so all chrome logging goes to
/var/log/chrome/chrome instead of split between this location and
/home/chronos/user/log/chrome, which is in the cryptohome, and sometimes
not collected by autotests.

BUG=chromium:724273
TEST=manual

Review-Url: https://codereview.chromium.org/2893313003
Cr-Commit-Position: refs/heads/master@{#476476}
parent 64ccc57c
......@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/task_scheduler/post_task.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "content/public/browser/browser_thread.h"
......@@ -51,8 +52,8 @@ void RedirectChromeLogging(const base::CommandLine& command_line) {
return;
}
DCHECK(!chrome_logging_redirected_)
<< "Attempted to redirect logging when it was already initialized.";
if (command_line.HasSwitch(switches::kDisableLoggingRedirect))
return;
// Redirect logs to the session log directory, if set. Otherwise
// defaults to the profile dir.
......
......@@ -940,6 +940,9 @@ const char kWebApkServerUrl[] = "webapk-server-url";
// Custom crosh command.
const char kCroshCommand[] = "crosh-command";
// Disables logging redirect for testing.
const char kDisableLoggingRedirect[] = "disable-logging-redirect";
// Disables apps on the login screen. By default, they are allowed and can be
// installed through policy.
const char kDisableLoginScreenApps[] = "disable-login-screen-apps";
......
......@@ -273,6 +273,7 @@ extern const char kWebApkServerUrl[];
#if defined(OS_CHROMEOS)
extern const char kCroshCommand[];
extern const char kDisableLoggingRedirect[];
extern const char kDisableLoginScreenApps[];
extern const char kDisableNativeCups[];
#endif // defined(OS_CHROMEOS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment