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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 // zero or one: | 1160 // zero or one: |
1161 // Content-Disposition: form-data; name="channel" \r\n \r\n | 1161 // Content-Disposition: form-data; name="channel" \r\n \r\n |
1162 // beta \r\n | 1162 // beta \r\n |
1163 // BOUNDARY \r\n | 1163 // BOUNDARY \r\n |
1164 // | 1164 // |
1165 // zero or one: | 1165 // zero or one: |
1166 // Content-Disposition: form-data; name="num-views" \r\n \r\n | 1166 // Content-Disposition: form-data; name="num-views" \r\n \r\n |
1167 // 3 \r\n | 1167 // 3 \r\n |
1168 // BOUNDARY \r\n | 1168 // BOUNDARY \r\n |
1169 // | 1169 // |
1170 // zero or one: | |
1171 // Content-Disposition: form-data; name="num-extensions" \r\n \r\n | |
1172 // 5 \r\n | |
1173 // BOUNDARY \r\n | |
1174 // | |
1175 // zero to 10: | |
1176 // Content-Disposition: form-data; name="extension-1" \r\n \r\n | |
1177 // abcdefghijklmnopqrstuvwxyzabcdef \r\n | |
1178 // BOUNDARY \r\n | |
1179 // | |
1180 // zero to 4: | 1170 // zero to 4: |
1181 // Content-Disposition: form-data; name="prn-info-1" \r\n \r\n | 1171 // Content-Disposition: form-data; name="prn-info-1" \r\n \r\n |
1182 // abcdefghijklmnopqrstuvwxyzabcdef \r\n | 1172 // abcdefghijklmnopqrstuvwxyzabcdef \r\n |
1183 // BOUNDARY \r\n | 1173 // BOUNDARY \r\n |
1184 // | 1174 // |
1185 // zero or one: | 1175 // zero or one: |
1186 // Content-Disposition: form-data; name="num-switches" \r\n \r\n | 1176 // Content-Disposition: form-data; name="num-switches" \r\n \r\n |
1187 // 5 \r\n | 1177 // 5 \r\n |
1188 // BOUNDARY \r\n | 1178 // BOUNDARY \r\n |
1189 // | 1179 // |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 writer.AddBoundary(); | 1294 writer.AddBoundary(); |
1305 writer.Flush(); | 1295 writer.Flush(); |
1306 } | 1296 } |
1307 | 1297 |
1308 if (*child_process_logging::g_num_views) { | 1298 if (*child_process_logging::g_num_views) { |
1309 writer.AddPairString("num-views", child_process_logging::g_num_views); | 1299 writer.AddPairString("num-views", child_process_logging::g_num_views); |
1310 writer.AddBoundary(); | 1300 writer.AddBoundary(); |
1311 writer.Flush(); | 1301 writer.Flush(); |
1312 } | 1302 } |
1313 | 1303 |
1314 if (*child_process_logging::g_num_extensions) { | |
1315 writer.AddPairString("num-extensions", | |
1316 child_process_logging::g_num_extensions); | |
1317 writer.AddBoundary(); | |
1318 writer.Flush(); | |
1319 } | |
1320 | |
1321 unsigned extension_ids_len = | |
1322 my_strlen(child_process_logging::g_extension_ids); | |
1323 if (extension_ids_len) { | |
1324 static const char extension_msg[] = "extension-"; | |
1325 static const unsigned kMaxExtensionsLen = | |
1326 kMaxReportedActiveExtensions * child_process_logging::kExtensionLen; | |
1327 writer.AddPairDataInChunks(extension_msg, sizeof(extension_msg) - 1, | |
1328 child_process_logging::g_extension_ids, | |
1329 std::min(extension_ids_len, kMaxExtensionsLen), | |
1330 child_process_logging::kExtensionLen, | |
1331 false /* Don't strip whitespace. */); | |
1332 } | |
1333 | |
1334 unsigned printer_info_len = | 1304 unsigned printer_info_len = |
1335 my_strlen(child_process_logging::g_printer_info); | 1305 my_strlen(child_process_logging::g_printer_info); |
1336 if (printer_info_len) { | 1306 if (printer_info_len) { |
1337 static const char printer_info_msg[] = "prn-info-"; | 1307 static const char printer_info_msg[] = "prn-info-"; |
1338 static const unsigned kMaxPrnInfoLen = | 1308 static const unsigned kMaxPrnInfoLen = |
1339 kMaxReportedPrinterRecords * child_process_logging::kPrinterInfoStrLen; | 1309 kMaxReportedPrinterRecords * child_process_logging::kPrinterInfoStrLen; |
1340 writer.AddPairDataInChunks(printer_info_msg, sizeof(printer_info_msg) - 1, | 1310 writer.AddPairDataInChunks(printer_info_msg, sizeof(printer_info_msg) - 1, |
1341 child_process_logging::g_printer_info, | 1311 child_process_logging::g_printer_info, |
1342 std::min(printer_info_len, kMaxPrnInfoLen), | 1312 std::min(printer_info_len, kMaxPrnInfoLen), |
1343 child_process_logging::kPrinterInfoStrLen, | 1313 child_process_logging::kPrinterInfoStrLen, |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 } else { | 1611 } else { |
1642 EnableNonBrowserCrashDumping(minidump_fd); | 1612 EnableNonBrowserCrashDumping(minidump_fd); |
1643 } | 1613 } |
1644 } | 1614 } |
1645 } | 1615 } |
1646 #endif // OS_ANDROID | 1616 #endif // OS_ANDROID |
1647 | 1617 |
1648 bool IsCrashReporterEnabled() { | 1618 bool IsCrashReporterEnabled() { |
1649 return g_is_crash_reporter_enabled; | 1619 return g_is_crash_reporter_enabled; |
1650 } | 1620 } |
OLD | NEW |