OLD | NEW |
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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 commands.push_back(std::make_pair("alsa controls", command)); | 30 commands.push_back(std::make_pair("alsa controls", command)); |
31 | 31 |
32 command = CommandLine((base::FilePath("/usr/bin/cras_test_client"))); | 32 command = CommandLine((base::FilePath("/usr/bin/cras_test_client"))); |
33 command.AppendArg("--dump_server_info"); | 33 command.AppendArg("--dump_server_info"); |
34 command.AppendArg("--dump_audio_thread"); | 34 command.AppendArg("--dump_audio_thread"); |
35 commands.push_back(std::make_pair("cras", command)); | 35 commands.push_back(std::make_pair("cras", command)); |
36 | 36 |
37 command = CommandLine((base::FilePath("/usr/bin/audio_diagnostics"))); | 37 command = CommandLine((base::FilePath("/usr/bin/audio_diagnostics"))); |
38 commands.push_back(std::make_pair("audio_diagnostics", command)); | 38 commands.push_back(std::make_pair("audio_diagnostics", command)); |
39 | 39 |
| 40 #if 0 |
| 41 // This command hangs as of R39. TODO(alhli): Make cras_test_client more |
| 42 // robust or add a wrapper script that times out, and fix this or remove |
| 43 // this code. crbug.com/419523 |
40 command = CommandLine((base::FilePath("/usr/bin/cras_test_client"))); | 44 command = CommandLine((base::FilePath("/usr/bin/cras_test_client"))); |
41 command.AppendArg("--loopback_file"); | 45 command.AppendArg("--loopback_file"); |
42 command.AppendArg("/dev/null"); | 46 command.AppendArg("/dev/null"); |
43 command.AppendArg("--rate"); | 47 command.AppendArg("--rate"); |
44 command.AppendArg("44100"); | 48 command.AppendArg("44100"); |
45 command.AppendArg("--duration_seconds"); | 49 command.AppendArg("--duration_seconds"); |
46 command.AppendArg("0.01"); | 50 command.AppendArg("0.01"); |
47 command.AppendArg("--show_total_rms"); | 51 command.AppendArg("--show_total_rms"); |
48 commands.push_back(std::make_pair("cras_rms", command)); | 52 commands.push_back(std::make_pair("cras_rms", command)); |
| 53 #endif |
49 | 54 |
50 command = CommandLine((base::FilePath("/usr/bin/printenv"))); | 55 command = CommandLine((base::FilePath("/usr/bin/printenv"))); |
51 commands.push_back(std::make_pair("env", command)); | 56 commands.push_back(std::make_pair("env", command)); |
52 | 57 |
53 command = CommandLine(base::FilePath("/usr/bin/setxkbmap")); | 58 command = CommandLine(base::FilePath("/usr/bin/setxkbmap")); |
54 command.AppendArg("-print"); | 59 command.AppendArg("-print"); |
55 command.AppendArg("-query"); | 60 command.AppendArg("-query"); |
56 commands.push_back(std::make_pair("setxkbmap", command)); | 61 commands.push_back(std::make_pair("setxkbmap", command)); |
57 | 62 |
58 command = CommandLine(base::FilePath("/usr/bin/xinput")); | 63 command = CommandLine(base::FilePath("/usr/bin/xinput")); |
(...skipping 29 matching lines...) Expand all Loading... |
88 DCHECK(!callback.is_null()); | 93 DCHECK(!callback.is_null()); |
89 | 94 |
90 SystemLogsResponse* response = new SystemLogsResponse; | 95 SystemLogsResponse* response = new SystemLogsResponse; |
91 BrowserThread::PostBlockingPoolTaskAndReply( | 96 BrowserThread::PostBlockingPoolTaskAndReply( |
92 FROM_HERE, | 97 FROM_HERE, |
93 base::Bind(&ExecuteCommandLines, response), | 98 base::Bind(&ExecuteCommandLines, response), |
94 base::Bind(callback, base::Owned(response))); | 99 base::Bind(callback, base::Owned(response))); |
95 } | 100 } |
96 | 101 |
97 } // namespace system_logs | 102 } // namespace system_logs |
OLD | NEW |