| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/process_util.h" | 14 #include "base/process/launch.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 | 16 |
| 17 using content::BrowserThread; | 17 using content::BrowserThread; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Gathers log data from various scripts/programs. | 21 // Gathers log data from various scripts/programs. |
| 22 void ExecuteCommandLines(chromeos::SystemLogsResponse* response) { | 22 void ExecuteCommandLines(chromeos::SystemLogsResponse* response) { |
| 23 // TODO(tudalex): Move program calling in a array or something similar to make | 23 // TODO(tudalex): Move program calling in a array or something similar to make |
| 24 // it more easier to modify and understand. | 24 // it more easier to modify and understand. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 DCHECK(!callback.is_null()); | 87 DCHECK(!callback.is_null()); |
| 88 | 88 |
| 89 SystemLogsResponse* response = new SystemLogsResponse; | 89 SystemLogsResponse* response = new SystemLogsResponse; |
| 90 BrowserThread::PostBlockingPoolTaskAndReply( | 90 BrowserThread::PostBlockingPoolTaskAndReply( |
| 91 FROM_HERE, | 91 FROM_HERE, |
| 92 base::Bind(&ExecuteCommandLines, response), | 92 base::Bind(&ExecuteCommandLines, response), |
| 93 base::Bind(callback, base::Owned(response))); | 93 base::Bind(callback, base::Owned(response))); |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace chromeos | 96 } // namespace chromeos |
| OLD | NEW |