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

Unified Diff: chrome/browser/chromeos/system_logs/command_line_log_source.cc

Issue 2556783006: Include full du dump in feedback reports (Closed)
Patch Set: More accurate regex for excluding downloads Created 4 years 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: 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"));
« 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