Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: trunk/src/chrome/app/breakpad_linux.cc

Issue 23503070: Revert 223610 "Set the printer info in crash reports using the c..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/chrome/app/breakpad_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 //
1160 // zero or one: 1165 // zero or one:
1161 // Content-Disposition: form-data; name="num-switches" \r\n \r\n 1166 // Content-Disposition: form-data; name="num-switches" \r\n \r\n
1162 // 5 \r\n 1167 // 5 \r\n
1163 // BOUNDARY \r\n 1168 // BOUNDARY \r\n
1164 // 1169 //
1165 // zero to 15: 1170 // zero to 15:
1166 // Content-Disposition: form-data; name="switch-1" \r\n \r\n 1171 // Content-Disposition: form-data; name="switch-1" \r\n \r\n
1167 // --foo \r\n 1172 // --foo \r\n
1168 // BOUNDARY \r\n 1173 // BOUNDARY \r\n
1169 // 1174 //
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 writer.Flush(); 1272 writer.Flush();
1268 } 1273 }
1269 1274
1270 if (info.distro_length) { 1275 if (info.distro_length) {
1271 static const char distro_msg[] = "lsb-release"; 1276 static const char distro_msg[] = "lsb-release";
1272 writer.AddPairString(distro_msg, info.distro); 1277 writer.AddPairString(distro_msg, info.distro);
1273 writer.AddBoundary(); 1278 writer.AddBoundary();
1274 writer.Flush(); 1279 writer.Flush();
1275 } 1280 }
1276 1281
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
1277 if (*child_process_logging::g_num_switches) { 1295 if (*child_process_logging::g_num_switches) {
1278 writer.AddPairString("num-switches", 1296 writer.AddPairString("num-switches",
1279 child_process_logging::g_num_switches); 1297 child_process_logging::g_num_switches);
1280 writer.AddBoundary(); 1298 writer.AddBoundary();
1281 writer.Flush(); 1299 writer.Flush();
1282 } 1300 }
1283 1301
1284 unsigned switches_len = 1302 unsigned switches_len =
1285 my_strlen(child_process_logging::g_switches); 1303 my_strlen(child_process_logging::g_switches);
1286 if (switches_len) { 1304 if (switches_len) {
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 } else { 1589 } else {
1572 EnableNonBrowserCrashDumping(minidump_fd); 1590 EnableNonBrowserCrashDumping(minidump_fd);
1573 } 1591 }
1574 } 1592 }
1575 } 1593 }
1576 #endif // OS_ANDROID 1594 #endif // OS_ANDROID
1577 1595
1578 bool IsCrashReporterEnabled() { 1596 bool IsCrashReporterEnabled() {
1579 return g_is_crash_reporter_enabled; 1597 return g_is_crash_reporter_enabled;
1580 } 1598 }
OLDNEW
« no previous file with comments | « no previous file | trunk/src/chrome/app/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698