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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 CommandLineLogSource::~CommandLineLogSource() { | 109 CommandLineLogSource::~CommandLineLogSource() { |
110 } | 110 } |
111 | 111 |
112 void CommandLineLogSource::Fetch(const SysLogsSourceCallback& callback) { | 112 void CommandLineLogSource::Fetch(const SysLogsSourceCallback& callback) { |
113 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 113 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
114 DCHECK(!callback.is_null()); | 114 DCHECK(!callback.is_null()); |
115 | 115 |
116 SystemLogsResponse* response = new SystemLogsResponse; | 116 SystemLogsResponse* response = new SystemLogsResponse; |
117 base::PostTaskWithTraitsAndReply(FROM_HERE, | 117 base::PostTaskWithTraitsAndReply( |
118 base::TaskTraits().MayBlock().WithPriority( | 118 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
119 base::TaskPriority::BACKGROUND), | 119 base::Bind(&ExecuteCommandLines, response), |
120 base::Bind(&ExecuteCommandLines, response), | 120 base::Bind(callback, base::Owned(response))); |
121 base::Bind(callback, base::Owned(response))); | |
122 } | 121 } |
123 | 122 |
124 } // namespace system_logs | 123 } // namespace system_logs |
OLD | NEW |