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

Side by Side Diff: chrome/common/child_process_logging.h

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/app/breakpad_win.cc ('k') | chrome/common/child_process_logging_mac.mm » ('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 #ifndef CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 5 #ifndef CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 6 #define CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/debug/crash_logging.h" 13 #include "base/debug/crash_logging.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 15
16 class CommandLine; 16 class CommandLine;
17 17
18 namespace gpu {
19 struct GPUInfo;
20 }
21
22 // The maximum number of active extensions we will report. 18 // The maximum number of active extensions we will report.
23 // Also used in chrome/app, but we define it here to avoid a common->app 19 // Also used in chrome/app, but we define it here to avoid a common->app
24 // dependency. 20 // dependency.
25 static const size_t kMaxReportedActiveExtensions = 10; 21 static const size_t kMaxReportedActiveExtensions = 10;
26 22
27 // The maximum number of variation chunks we will report. 23 // The maximum number of variation chunks we will report.
28 // Also used in chrome/app, but we define it here to avoid a common->app 24 // Also used in chrome/app, but we define it here to avoid a common->app
29 // dependency. 25 // dependency.
30 static const size_t kMaxReportedVariationChunks = 15; 26 static const size_t kMaxReportedVariationChunks = 15;
31 27
(...skipping 13 matching lines...) Expand all
45 static const size_t kMaxSwitches = 15; 41 static const size_t kMaxSwitches = 15;
46 42
47 namespace child_process_logging { 43 namespace child_process_logging {
48 44
49 #if defined(OS_POSIX) && !defined(OS_MACOSX) 45 #if defined(OS_POSIX) && !defined(OS_MACOSX)
50 // These are declared here so the crash reporter can access them directly in 46 // These are declared here so the crash reporter can access them directly in
51 // compromised context without going through the standard library. 47 // compromised context without going through the standard library.
52 extern char g_channel[]; 48 extern char g_channel[];
53 extern char g_client_id[]; 49 extern char g_client_id[];
54 extern char g_extension_ids[]; 50 extern char g_extension_ids[];
55 extern char g_gpu_vendor_id[];
56 extern char g_gpu_device_id[];
57 extern char g_gpu_gl_vendor[];
58 extern char g_gpu_gl_renderer[];
59 extern char g_gpu_driver_ver[];
60 extern char g_gpu_ps_ver[];
61 extern char g_gpu_vs_ver[];
62 extern char g_num_extensions[]; 51 extern char g_num_extensions[];
63 extern char g_num_switches[]; 52 extern char g_num_switches[];
64 extern char g_num_variations[]; 53 extern char g_num_variations[];
65 extern char g_num_views[]; 54 extern char g_num_views[];
66 extern char g_printer_info[]; 55 extern char g_printer_info[];
67 extern char g_switches[]; 56 extern char g_switches[];
68 extern char g_variation_chunks[]; 57 extern char g_variation_chunks[];
69 58
70 // Assume IDs are 32 bytes long. 59 // Assume IDs are 32 bytes long.
71 static const size_t kExtensionLen = 32; 60 static const size_t kExtensionLen = 32;
(...skipping 16 matching lines...) Expand all
88 // mean different things depending on the process type: 77 // mean different things depending on the process type:
89 // - browser: all enabled extensions 78 // - browser: all enabled extensions
90 // - renderer: the unique set of extension ids from all content scripts 79 // - renderer: the unique set of extension ids from all content scripts
91 // - extension: the id of each extension running in this process (there can be 80 // - extension: the id of each extension running in this process (there can be
92 // multiple because of process collapsing). 81 // multiple because of process collapsing).
93 void SetActiveExtensions(const std::set<std::string>& extension_ids); 82 void SetActiveExtensions(const std::set<std::string>& extension_ids);
94 83
95 // Sets a number of views/tabs opened in this process. 84 // Sets a number of views/tabs opened in this process.
96 void SetNumberOfViews(int number_of_views); 85 void SetNumberOfViews(int number_of_views);
97 86
98 // Sets the data on the gpu to send along with crash reports.
99 void SetGpuInfo(const gpu::GPUInfo& gpu_info);
100
101 // Sets the data on the printer to send along with crash reports. Data may be 87 // Sets the data on the printer to send along with crash reports. Data may be
102 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring 88 // separated by ';' up to kMaxReportedPrinterRecords strings. Each substring
103 // would be cut to 63 chars. 89 // would be cut to 63 chars.
104 void SetPrinterInfo(const char* printer_info); 90 void SetPrinterInfo(const char* printer_info);
105 91
106 // Sets the command line arguments to send along with crash reports to the 92 // Sets the command line arguments to send along with crash reports to the
107 // values in |command_line|. 93 // values in |command_line|.
108 void SetCommandLine(const CommandLine* command_line); 94 void SetCommandLine(const CommandLine* command_line);
109 95
110 // Initialize the list of experiment info to send along with crash reports. 96 // Initialize the list of experiment info to send along with crash reports.
(...skipping 24 matching lines...) Expand all
135 #if defined(OS_WIN) 121 #if defined(OS_WIN)
136 namespace child_process_logging { 122 namespace child_process_logging {
137 123
138 // Sets up the base/debug/crash_logging.h mechanism. 124 // Sets up the base/debug/crash_logging.h mechanism.
139 void Init(); 125 void Init();
140 126
141 } // namespace child_process_logging 127 } // namespace child_process_logging
142 #endif // defined(OS_WIN) 128 #endif // defined(OS_WIN)
143 129
144 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_ 130 #endif // CHROME_COMMON_CHILD_PROCESS_LOGGING_H_
OLDNEW
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/common/child_process_logging_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698