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

Side by Side Diff: chrome/browser/chromeos/system_logs/command_line_log_source.cc

Issue 2856083003: Revert of Add list of plugged-in USB devices to feedback reports (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/chromeos/system_logs/command_line_log_source.h" 5 #include "chrome/browser/chromeos/system_logs/command_line_log_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (base::SysInfo::IsRunningOnChromeOS()) { 73 if (base::SysInfo::IsRunningOnChromeOS()) {
74 // The following command would hang if run in Linux Chrome OS build on a 74 // The following command would hang if run in Linux Chrome OS build on a
75 // Linux Workstation. 75 // Linux Workstation.
76 command = base::CommandLine(base::FilePath("/bin/sh")); 76 command = base::CommandLine(base::FilePath("/bin/sh"));
77 command.AppendArg("-c"); 77 command.AppendArg("-c");
78 command.AppendArg( 78 command.AppendArg(
79 "/usr/bin/du -h / | grep -v -e \\/home\\/.*\\/Downloads\\/"); 79 "/usr/bin/du -h / | grep -v -e \\/home\\/.*\\/Downloads\\/");
80 commands.push_back(std::make_pair("system_files", command)); 80 commands.push_back(std::make_pair("system_files", command));
81 } 81 }
82 82
83 // Track the list of plugged-in USB devices.
84 command = base::CommandLine(base::FilePath("/bin/sh"));
85 command.AppendArg("-c");
86 command.AppendArg("/usr/bin/lsusb -t");
87 commands.emplace_back("usb_devices", command);
88
89 // Get disk space usage information 83 // Get disk space usage information
90 command = base::CommandLine(base::FilePath("/bin/df")); 84 command = base::CommandLine(base::FilePath("/bin/df"));
91 commands.push_back(std::make_pair("disk_usage", command)); 85 commands.push_back(std::make_pair("disk_usage", command));
92 86
93 for (size_t i = 0; i < commands.size(); ++i) { 87 for (size_t i = 0; i < commands.size(); ++i) {
94 VLOG(1) << "Executting System Logs Command: " << commands[i].first; 88 VLOG(1) << "Executting System Logs Command: " << commands[i].first;
95 std::string output; 89 std::string output;
96 base::GetAppOutput(commands[i].second, &output); 90 base::GetAppOutput(commands[i].second, &output);
97 (*response)[commands[i].first] = output; 91 (*response)[commands[i].first] = output;
98 } 92 }
(...skipping 15 matching lines...) Expand all
114 108
115 SystemLogsResponse* response = new SystemLogsResponse; 109 SystemLogsResponse* response = new SystemLogsResponse;
116 base::PostTaskWithTraitsAndReply(FROM_HERE, 110 base::PostTaskWithTraitsAndReply(FROM_HERE,
117 base::TaskTraits().MayBlock().WithPriority( 111 base::TaskTraits().MayBlock().WithPriority(
118 base::TaskPriority::BACKGROUND), 112 base::TaskPriority::BACKGROUND),
119 base::Bind(&ExecuteCommandLines, response), 113 base::Bind(&ExecuteCommandLines, response),
120 base::Bind(callback, base::Owned(response))); 114 base::Bind(callback, base::Owned(response)));
121 } 115 }
122 116
123 } // namespace system_logs 117 } // namespace system_logs
OLDNEW
« 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