| Index: chrome/browser/chromeos/system_logs/command_line_log_source.cc
|
| diff --git a/chrome/browser/chromeos/system_logs/command_line_log_source.cc b/chrome/browser/chromeos/system_logs/command_line_log_source.cc
|
| index de59f36d427e109213eeb145bf92be6142eb8cb4..a1675314a0c82c483a155bc728a79f07db1cab76 100644
|
| --- a/chrome/browser/chromeos/system_logs/command_line_log_source.cc
|
| +++ b/chrome/browser/chromeos/system_logs/command_line_log_source.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/files/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/process/launch.h"
|
| +#include "base/sys_info.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| using content::BrowserThread;
|
| @@ -66,13 +67,17 @@ void ExecuteCommandLines(system_logs::SystemLogsResponse* response) {
|
| commands.push_back(std::make_pair("modetest", command));
|
| #endif
|
|
|
| - // Get a list of file sizes for the logged in user (excluding the names of
|
| - // the files in the Downloads directory for privay reasons).
|
| - command = base::CommandLine(base::FilePath("/bin/sh"));
|
| - command.AppendArg("-c");
|
| - command.AppendArg("/usr/bin/du -h /home/chronos/user |"
|
| - " grep -v -e \\/home\\/chronos\\/user\\/Downloads\\/");
|
| - commands.push_back(std::make_pair("user_files", command));
|
| + // Get a list of file sizes for the whole system (excluding the names of the
|
| + // files in the Downloads directory for privay reasons).
|
| + if (base::SysInfo::IsRunningOnChromeOS()) {
|
| + // The following command would hang if run in Linux Chrome OS build on a
|
| + // Linux Workstation.
|
| + command = base::CommandLine(base::FilePath("/bin/sh"));
|
| + command.AppendArg("-c");
|
| + command.AppendArg(
|
| + "/usr/bin/du -h / | grep -v -e \\/home\\/.*\\/Downloads\\/");
|
| + commands.push_back(std::make_pair("system_files", command));
|
| + }
|
|
|
| // Get disk space usage information
|
| command = base::CommandLine(base::FilePath("/bin/df"));
|
|
|