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 | 7 |
8 #include "chrome/app/breakpad_linux.h" | 8 #include "chrome/app/breakpad_linux.h" |
9 | 9 |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 // zero or one: | 1150 // zero or one: |
1151 // Content-Disposition: form-data; name="ptype" \r\n \r\n | 1151 // Content-Disposition: form-data; name="ptype" \r\n \r\n |
1152 // abcdef \r\n | 1152 // abcdef \r\n |
1153 // BOUNDARY \r\n | 1153 // BOUNDARY \r\n |
1154 // | 1154 // |
1155 // zero or one: | 1155 // zero or one: |
1156 // Content-Disposition: form-data; name="lsb-release" \r\n \r\n | 1156 // Content-Disposition: form-data; name="lsb-release" \r\n \r\n |
1157 // abcdef \r\n | 1157 // abcdef \r\n |
1158 // BOUNDARY \r\n | 1158 // BOUNDARY \r\n |
1159 // | 1159 // |
1160 // zero to 4: | |
1161 // Content-Disposition: form-data; name="prn-info-1" \r\n \r\n | |
1162 // abcdefghijklmnopqrstuvwxyzabcdef \r\n | |
1163 // BOUNDARY \r\n | |
1164 // | |
1165 // zero or one: | 1160 // zero or one: |
1166 // Content-Disposition: form-data; name="num-switches" \r\n \r\n | 1161 // Content-Disposition: form-data; name="num-switches" \r\n \r\n |
1167 // 5 \r\n | 1162 // 5 \r\n |
1168 // BOUNDARY \r\n | 1163 // BOUNDARY \r\n |
1169 // | 1164 // |
1170 // zero to 15: | 1165 // zero to 15: |
1171 // Content-Disposition: form-data; name="switch-1" \r\n \r\n | 1166 // Content-Disposition: form-data; name="switch-1" \r\n \r\n |
1172 // --foo \r\n | 1167 // --foo \r\n |
1173 // BOUNDARY \r\n | 1168 // BOUNDARY \r\n |
1174 // | 1169 // |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 writer.Flush(); | 1267 writer.Flush(); |
1273 } | 1268 } |
1274 | 1269 |
1275 if (info.distro_length) { | 1270 if (info.distro_length) { |
1276 static const char distro_msg[] = "lsb-release"; | 1271 static const char distro_msg[] = "lsb-release"; |
1277 writer.AddPairString(distro_msg, info.distro); | 1272 writer.AddPairString(distro_msg, info.distro); |
1278 writer.AddBoundary(); | 1273 writer.AddBoundary(); |
1279 writer.Flush(); | 1274 writer.Flush(); |
1280 } | 1275 } |
1281 | 1276 |
1282 unsigned printer_info_len = | |
1283 my_strlen(child_process_logging::g_printer_info); | |
1284 if (printer_info_len) { | |
1285 static const char printer_info_msg[] = "prn-info-"; | |
1286 static const unsigned kMaxPrnInfoLen = | |
1287 kMaxReportedPrinterRecords * child_process_logging::kPrinterInfoStrLen; | |
1288 writer.AddPairDataInChunks(printer_info_msg, sizeof(printer_info_msg) - 1, | |
1289 child_process_logging::g_printer_info, | |
1290 std::min(printer_info_len, kMaxPrnInfoLen), | |
1291 child_process_logging::kPrinterInfoStrLen, | |
1292 true); | |
1293 } | |
1294 | |
1295 if (*child_process_logging::g_num_switches) { | 1277 if (*child_process_logging::g_num_switches) { |
1296 writer.AddPairString("num-switches", | 1278 writer.AddPairString("num-switches", |
1297 child_process_logging::g_num_switches); | 1279 child_process_logging::g_num_switches); |
1298 writer.AddBoundary(); | 1280 writer.AddBoundary(); |
1299 writer.Flush(); | 1281 writer.Flush(); |
1300 } | 1282 } |
1301 | 1283 |
1302 unsigned switches_len = | 1284 unsigned switches_len = |
1303 my_strlen(child_process_logging::g_switches); | 1285 my_strlen(child_process_logging::g_switches); |
1304 if (switches_len) { | 1286 if (switches_len) { |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 } else { | 1571 } else { |
1590 EnableNonBrowserCrashDumping(minidump_fd); | 1572 EnableNonBrowserCrashDumping(minidump_fd); |
1591 } | 1573 } |
1592 } | 1574 } |
1593 } | 1575 } |
1594 #endif // OS_ANDROID | 1576 #endif // OS_ANDROID |
1595 | 1577 |
1596 bool IsCrashReporterEnabled() { | 1578 bool IsCrashReporterEnabled() { |
1597 return g_is_crash_reporter_enabled; | 1579 return g_is_crash_reporter_enabled; |
1598 } | 1580 } |
OLD | NEW |