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 // 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 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" | 7 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" |
8 | 8 |
9 #include "chrome/app/breakpad_linux.h" | 9 #include "chrome/app/breakpad_linux.h" |
10 | 10 |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 static const char extension_msg[] = "extension-"; | 567 static const char extension_msg[] = "extension-"; |
568 static const unsigned kMaxExtensionsLen = | 568 static const unsigned kMaxExtensionsLen = |
569 kMaxReportedActiveExtensions * child_process_logging::kExtensionLen; | 569 kMaxReportedActiveExtensions * child_process_logging::kExtensionLen; |
570 writer.AddPairDataInChunks(extension_msg, sizeof(extension_msg) - 1, | 570 writer.AddPairDataInChunks(extension_msg, sizeof(extension_msg) - 1, |
571 child_process_logging::g_extension_ids, | 571 child_process_logging::g_extension_ids, |
572 std::min(extension_ids_len, kMaxExtensionsLen), | 572 std::min(extension_ids_len, kMaxExtensionsLen), |
573 child_process_logging::kExtensionLen, | 573 child_process_logging::kExtensionLen, |
574 false /* Don't strip whitespace. */); | 574 false /* Don't strip whitespace. */); |
575 } | 575 } |
576 | 576 |
| 577 unsigned printer_info_len = |
| 578 my_strlen(child_process_logging::g_printer_info); |
| 579 if (printer_info_len) { |
| 580 static const char printer_info_msg[] = "prn-info-"; |
| 581 static const unsigned kMaxPrnInfoLen = |
| 582 kMaxReportedPrinterRecords * child_process_logging::kPrinterInfoStrLen; |
| 583 writer.AddPairDataInChunks(printer_info_msg, sizeof(printer_info_msg) - 1, |
| 584 child_process_logging::g_printer_info, |
| 585 std::min(printer_info_len, kMaxPrnInfoLen), |
| 586 child_process_logging::kPrinterInfoStrLen, |
| 587 true); |
| 588 } |
| 589 |
577 if (my_strlen(child_process_logging::g_num_switches)) { | 590 if (my_strlen(child_process_logging::g_num_switches)) { |
578 writer.AddPairString("num-switches", | 591 writer.AddPairString("num-switches", |
579 child_process_logging::g_num_switches); | 592 child_process_logging::g_num_switches); |
580 writer.AddBoundary(); | 593 writer.AddBoundary(); |
581 writer.Flush(); | 594 writer.Flush(); |
582 } | 595 } |
583 | 596 |
584 unsigned switches_len = | 597 unsigned switches_len = |
585 my_strlen(child_process_logging::g_switches); | 598 my_strlen(child_process_logging::g_switches); |
586 if (switches_len) { | 599 if (switches_len) { |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 g_process_start_time = timeval_to_ms(&tv); | 1001 g_process_start_time = timeval_to_ms(&tv); |
989 else | 1002 else |
990 g_process_start_time = 0; | 1003 g_process_start_time = 0; |
991 | 1004 |
992 logging::SetDumpWithoutCrashingFunction(&DumpProcess); | 1005 logging::SetDumpWithoutCrashingFunction(&DumpProcess); |
993 } | 1006 } |
994 | 1007 |
995 bool IsCrashReporterEnabled() { | 1008 bool IsCrashReporterEnabled() { |
996 return g_is_crash_reporter_enabled; | 1009 return g_is_crash_reporter_enabled; |
997 } | 1010 } |
OLD | NEW |