OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
7 | 7 |
8 #include "components/crash/app/breakpad_linux.h" | 8 #include "components/crash/app/breakpad_linux.h" |
9 | 9 |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } | 394 } |
395 | 395 |
396 #if defined(OS_CHROMEOS) | 396 #if defined(OS_CHROMEOS) |
397 // This subclass is used on Chromium OS to report crashes in a format easy for | 397 // This subclass is used on Chromium OS to report crashes in a format easy for |
398 // the central crash reporting facility to understand. | 398 // the central crash reporting facility to understand. |
399 // Format is <name>:<data length in decimal>:<data> | 399 // Format is <name>:<data length in decimal>:<data> |
400 class CrashReporterWriter : public MimeWriter { | 400 class CrashReporterWriter : public MimeWriter { |
401 public: | 401 public: |
402 explicit CrashReporterWriter(int fd); | 402 explicit CrashReporterWriter(int fd); |
403 | 403 |
404 virtual void AddBoundary() override; | 404 void AddBoundary() override; |
405 | 405 |
406 virtual void AddEnd() override; | 406 void AddEnd() override; |
407 | 407 |
408 virtual void AddPairData(const char* msg_type, | 408 void AddPairData(const char* msg_type, |
| 409 size_t msg_type_size, |
| 410 const char* msg_data, |
| 411 size_t msg_data_size) override; |
| 412 |
| 413 void AddPairDataInChunks(const char* msg_type, |
409 size_t msg_type_size, | 414 size_t msg_type_size, |
410 const char* msg_data, | 415 const char* msg_data, |
411 size_t msg_data_size) override; | 416 size_t msg_data_size, |
| 417 size_t chunk_size, |
| 418 bool strip_trailing_spaces) override; |
412 | 419 |
413 virtual void AddPairDataInChunks(const char* msg_type, | 420 void AddFileContents(const char* filename_msg, |
414 size_t msg_type_size, | 421 uint8_t* file_data, |
415 const char* msg_data, | 422 size_t file_size) override; |
416 size_t msg_data_size, | |
417 size_t chunk_size, | |
418 bool strip_trailing_spaces) override; | |
419 | |
420 virtual void AddFileContents(const char* filename_msg, | |
421 uint8_t* file_data, | |
422 size_t file_size) override; | |
423 | 423 |
424 private: | 424 private: |
425 DISALLOW_COPY_AND_ASSIGN(CrashReporterWriter); | 425 DISALLOW_COPY_AND_ASSIGN(CrashReporterWriter); |
426 }; | 426 }; |
427 | 427 |
428 | 428 |
429 CrashReporterWriter::CrashReporterWriter(int fd) : MimeWriter(fd, "") {} | 429 CrashReporterWriter::CrashReporterWriter(int fd) : MimeWriter(fd, "") {} |
430 | 430 |
431 // No-ops. | 431 // No-ops. |
432 void CrashReporterWriter::AddBoundary() {} | 432 void CrashReporterWriter::AddBoundary() {} |
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 } | 1709 } |
1710 } | 1710 } |
1711 } | 1711 } |
1712 #endif // OS_ANDROID | 1712 #endif // OS_ANDROID |
1713 | 1713 |
1714 bool IsCrashReporterEnabled() { | 1714 bool IsCrashReporterEnabled() { |
1715 return g_is_crash_reporter_enabled; | 1715 return g_is_crash_reporter_enabled; |
1716 } | 1716 } |
1717 | 1717 |
1718 } // namespace breakpad | 1718 } // namespace breakpad |
OLD | NEW |