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

Side by Side Diff: chrome/common/crash_keys.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 | « chrome/common/crash_keys.h ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/common/crash_keys.h" 5 #include "chrome/common/crash_keys.h"
6 6
7 #if defined(OS_MACOSX) 7 #if defined(OS_MACOSX)
8 #include "breakpad/src/common/simple_string_dictionary.h" 8 #include "breakpad/src/common/simple_string_dictionary.h"
9 #elif defined(OS_WIN) 9 #elif defined(OS_WIN)
10 #include "breakpad/src/client/windows/common/ipc_protocol.h" 10 #include "breakpad/src/client/windows/common/ipc_protocol.h"
(...skipping 28 matching lines...) Expand all
39 COMPILE_ASSERT(kSmallSize <= kSingleChunkLength, 39 COMPILE_ASSERT(kSmallSize <= kSingleChunkLength,
40 crash_key_chunk_size_too_small); 40 crash_key_chunk_size_too_small);
41 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
42 COMPILE_ASSERT(kMediumSize <= kSingleChunkLength, 42 COMPILE_ASSERT(kMediumSize <= kSingleChunkLength,
43 mac_has_medium_size_crash_key_chunks); 43 mac_has_medium_size_crash_key_chunks);
44 #endif 44 #endif
45 45
46 size_t RegisterChromeCrashKeys() { 46 size_t RegisterChromeCrashKeys() {
47 base::debug::CrashKey keys[] = { 47 base::debug::CrashKey keys[] = {
48 { kActiveURL, kLargeSize }, 48 { kActiveURL, kLargeSize },
49 #if !defined(OS_ANDROID)
50 { kGPUVendorID, kSmallSize },
51 { kGPUDeviceID, kSmallSize },
52 #endif
53 { kGPUDriverVersion, kSmallSize },
54 { kGPUPixelShaderVersion, kSmallSize },
55 { kGPUVertexShaderVersion, kSmallSize },
56 #if defined(OS_LINUX)
57 { kGPUVendor, kSmallSize },
58 { kGPURenderer, kSmallSize },
59 #elif defined(OS_MACOSX)
60 { kGPUGLVersion, kSmallSize },
61 #endif
49 62
50 // content/: 63 // content/:
51 { "ppapi_path", kMediumSize }, 64 { "ppapi_path", kMediumSize },
52 { "subresource_url", kLargeSize }, 65 { "subresource_url", kLargeSize },
53 #if defined(OS_MACOSX) 66 #if defined(OS_MACOSX)
54 { mac::kFirstNSException, kMediumSize }, 67 { mac::kFirstNSException, kMediumSize },
55 { mac::kFirstNSExceptionTrace, kMediumSize }, 68 { mac::kFirstNSExceptionTrace, kMediumSize },
56 { mac::kLastNSException, kMediumSize }, 69 { mac::kLastNSException, kMediumSize },
57 { mac::kLastNSExceptionTrace, kMediumSize }, 70 { mac::kLastNSExceptionTrace, kMediumSize },
58 { mac::kNSException, kMediumSize }, 71 { mac::kNSException, kMediumSize },
59 { mac::kNSExceptionTrace, kMediumSize }, 72 { mac::kNSExceptionTrace, kMediumSize },
60 { mac::kSendAction, kMediumSize }, 73 { mac::kSendAction, kMediumSize },
61 { mac::kZombie, kMediumSize }, 74 { mac::kZombie, kMediumSize },
62 { mac::kZombieTrace, kMediumSize }, 75 { mac::kZombieTrace, kMediumSize },
63 // content/: 76 // content/:
64 { "channel_error_bt", kMediumSize }, 77 { "channel_error_bt", kMediumSize },
65 { "remove_route_bt", kMediumSize }, 78 { "remove_route_bt", kMediumSize },
66 { "rwhvm_window", kMediumSize }, 79 { "rwhvm_window", kMediumSize },
67 // media/: 80 // media/:
68 { "VideoCaptureDeviceQTKit", kSmallSize }, 81 { "VideoCaptureDeviceQTKit", kSmallSize },
69 #endif 82 #endif
70 }; 83 };
71 84
72 return base::debug::InitCrashKeys(keys, arraysize(keys), kSingleChunkLength); 85 return base::debug::InitCrashKeys(keys, arraysize(keys), kSingleChunkLength);
73 } 86 }
74 87
75 const char kActiveURL[] = "url-chunk"; 88 const char kActiveURL[] = "url-chunk";
76 89
90 #if !defined(OS_ANDROID)
91 const char kGPUVendorID[] = "gpu-venid";
92 const char kGPUDeviceID[] = "gpu-devid";
93 #endif
94 const char kGPUDriverVersion[] = "gpu-driver";
95 const char kGPUPixelShaderVersion[] = "gpu-psver";
96 const char kGPUVertexShaderVersion[] = "gpu-vsver";
97 #if defined(OS_LINUX)
98 const char kGPUVendor[] = "gpu-gl-vendor";
99 const char kGPURenderer[] = "gpu-gl-renderer";
100 #elif defined(OS_MACOSX)
101 const char kGPUGLVersion[] = "gpu-glver";
102 #endif
103
77 #if defined(OS_MACOSX) 104 #if defined(OS_MACOSX)
78 namespace mac { 105 namespace mac {
79 106
80 const char kFirstNSException[] = "firstexception"; 107 const char kFirstNSException[] = "firstexception";
81 const char kFirstNSExceptionTrace[] = "firstexception_bt"; 108 const char kFirstNSExceptionTrace[] = "firstexception_bt";
82 109
83 const char kLastNSException[] = "lastexception"; 110 const char kLastNSException[] = "lastexception";
84 const char kLastNSExceptionTrace[] = "lastexception_bt"; 111 const char kLastNSExceptionTrace[] = "lastexception_bt";
85 112
86 const char kNSException[] = "nsexception"; 113 const char kNSException[] = "nsexception";
87 const char kNSExceptionTrace[] = "nsexception_bt"; 114 const char kNSExceptionTrace[] = "nsexception_bt";
88 115
89 const char kSendAction[] = "sendaction"; 116 const char kSendAction[] = "sendaction";
90 117
91 const char kZombie[] = "zombie"; 118 const char kZombie[] = "zombie";
92 const char kZombieTrace[] = "zombie_dealloc_bt"; 119 const char kZombieTrace[] = "zombie_dealloc_bt";
93 120
94 } // namespace mac 121 } // namespace mac
95 #endif 122 #endif
96 123
97 } // namespace crash_keys 124 } // namespace crash_keys
OLDNEW
« no previous file with comments | « chrome/common/crash_keys.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698