OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/debug_log_writer.h" | 5 #include "chrome/browser/chromeos/system_logs/debug_log_writer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (!succeeded) { | 183 if (!succeeded) { |
184 if (!callback.is_null()) | 184 if (!callback.is_null()) |
185 callback.Run(base::FilePath(), false); | 185 callback.Run(base::FilePath(), false); |
186 | 186 |
187 return; | 187 return; |
188 } | 188 } |
189 | 189 |
190 base::FilePath compressed_output_path = | 190 base::FilePath compressed_output_path = |
191 tar_file_path.AddExtension(FILE_PATH_LITERAL(".gz")); | 191 tar_file_path.AddExtension(FILE_PATH_LITERAL(".gz")); |
192 base::FilePath user_log_dir = | 192 base::FilePath user_log_dir = |
193 logging::GetSessionLogDir(*CommandLine::ForCurrentProcess()); | 193 logging::GetSessionLogDir(*base::CommandLine::ForCurrentProcess()); |
194 | 194 |
195 content::BrowserThread::PostBlockingPoolTask( | 195 content::BrowserThread::PostBlockingPoolTask( |
196 FROM_HERE, | 196 FROM_HERE, |
197 base::Bind(&AddUserLogsToArchive, | 197 base::Bind(&AddUserLogsToArchive, |
198 user_log_dir, | 198 user_log_dir, |
199 tar_file_path, | 199 tar_file_path, |
200 compressed_output_path, | 200 compressed_output_path, |
201 callback)); | 201 callback)); |
202 } | 202 } |
203 | 203 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 fileshelf.Append(FILE_PATH_LITERAL("combined-logs.tar")); | 266 fileshelf.Append(FILE_PATH_LITERAL("combined-logs.tar")); |
267 | 267 |
268 // Get system logs from /var/log first, then add user-specific stuff. | 268 // Get system logs from /var/log first, then add user-specific stuff. |
269 StartLogRetrieval(file_path, | 269 StartLogRetrieval(file_path, |
270 false, | 270 false, |
271 sequence_token_name, | 271 sequence_token_name, |
272 base::Bind(&OnSystemLogsAdded, callback)); | 272 base::Bind(&OnSystemLogsAdded, callback)); |
273 } | 273 } |
274 | 274 |
275 } // namespace chromeos | 275 } // namespace chromeos |
OLD | NEW |