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

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

Issue 23021021: Set the GPU info using the crash key system instead of platform-specific mechanisms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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 | 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 // zero or one: 1145 // zero or one:
1146 // Content-Disposition: form-data; name="ptime" \r\n \r\n 1146 // Content-Disposition: form-data; name="ptime" \r\n \r\n
1147 // abcdef \r\n 1147 // abcdef \r\n
1148 // BOUNDARY \r\n 1148 // BOUNDARY \r\n
1149 // 1149 //
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 more gpu entries:
1156 // Content-Disposition: form-data; name="gpu-xxxxx" \r\n \r\n
1157 // <gpu-xxxxx> \r\n
1158 // BOUNDARY \r\n
1159 //
1160 // zero or one: 1155 // zero or one:
1161 // Content-Disposition: form-data; name="lsb-release" \r\n \r\n 1156 // Content-Disposition: form-data; name="lsb-release" \r\n \r\n
1162 // abcdef \r\n 1157 // abcdef \r\n
1163 // BOUNDARY \r\n 1158 // BOUNDARY \r\n
1164 // 1159 //
1165 // zero or one: 1160 // zero or one:
1166 // Content-Disposition: form-data; name="channel" \r\n \r\n 1161 // Content-Disposition: form-data; name="channel" \r\n \r\n
1167 // beta \r\n 1162 // beta \r\n
1168 // BOUNDARY \r\n 1163 // BOUNDARY \r\n
1169 // 1164 //
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1285 }
1291 } 1286 }
1292 } 1287 }
1293 1288
1294 if (info.process_type_length) { 1289 if (info.process_type_length) {
1295 writer.AddPairString("ptype", info.process_type); 1290 writer.AddPairString("ptype", info.process_type);
1296 writer.AddBoundary(); 1291 writer.AddBoundary();
1297 writer.Flush(); 1292 writer.Flush();
1298 } 1293 }
1299 1294
1300 // If GPU info is known, send it.
1301 if (*child_process_logging::g_gpu_vendor_id) {
1302 #if !defined(OS_ANDROID)
1303 static const char vendor_msg[] = "gpu-venid";
1304 static const char device_msg[] = "gpu-devid";
1305 #endif
1306 static const char gl_vendor_msg[] = "gpu-gl-vendor";
1307 static const char gl_renderer_msg[] = "gpu-gl-renderer";
1308 static const char driver_msg[] = "gpu-driver";
1309 static const char psver_msg[] = "gpu-psver";
1310 static const char vsver_msg[] = "gpu-vsver";
1311
1312 #if !defined(OS_ANDROID)
1313 writer.AddPairString(vendor_msg, child_process_logging::g_gpu_vendor_id);
1314 writer.AddBoundary();
1315 writer.AddPairString(device_msg, child_process_logging::g_gpu_device_id);
1316 writer.AddBoundary();
1317 #endif
1318 writer.AddPairString(gl_vendor_msg, child_process_logging::g_gpu_gl_vendor);
1319 writer.AddBoundary();
1320 writer.AddPairString(gl_renderer_msg,
1321 child_process_logging::g_gpu_gl_renderer);
1322 writer.AddBoundary();
1323 writer.AddPairString(driver_msg, child_process_logging::g_gpu_driver_ver);
1324 writer.AddBoundary();
1325 writer.AddPairString(psver_msg, child_process_logging::g_gpu_ps_ver);
1326 writer.AddBoundary();
1327 writer.AddPairString(vsver_msg, child_process_logging::g_gpu_vs_ver);
1328 writer.AddBoundary();
1329 writer.Flush();
1330 }
1331
1332 if (info.distro_length) { 1295 if (info.distro_length) {
1333 static const char distro_msg[] = "lsb-release"; 1296 static const char distro_msg[] = "lsb-release";
1334 writer.AddPairString(distro_msg, info.distro); 1297 writer.AddPairString(distro_msg, info.distro);
1335 writer.AddBoundary(); 1298 writer.AddBoundary();
1336 writer.Flush(); 1299 writer.Flush();
1337 } 1300 }
1338 1301
1339 if (*child_process_logging::g_channel) { 1302 if (*child_process_logging::g_channel) {
1340 writer.AddPairString("channel", child_process_logging::g_channel); 1303 writer.AddPairString("channel", child_process_logging::g_channel);
1341 writer.AddBoundary(); 1304 writer.AddBoundary();
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 } else { 1641 } else {
1679 EnableNonBrowserCrashDumping(minidump_fd); 1642 EnableNonBrowserCrashDumping(minidump_fd);
1680 } 1643 }
1681 } 1644 }
1682 } 1645 }
1683 #endif // OS_ANDROID 1646 #endif // OS_ANDROID
1684 1647
1685 bool IsCrashReporterEnabled() { 1648 bool IsCrashReporterEnabled() {
1686 return g_is_crash_reporter_enabled; 1649 return g_is_crash_reporter_enabled;
1687 } 1650 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698