Index: chrome/common/child_process_logging.h |
diff --git a/chrome/common/child_process_logging.h b/chrome/common/child_process_logging.h |
index 6b68d8ce95a44b866a783fb0e1793207500270ed..30b07d5d7dc41eabbf860833343f9a0c5881e6af 100644 |
--- a/chrome/common/child_process_logging.h |
+++ b/chrome/common/child_process_logging.h |
@@ -24,6 +24,9 @@ struct GPUInfo; |
// dependency. |
static const int kMaxReportedActiveExtensions = 10; |
+// The maximum number of prn-info-* records. |
+static const size_t kMaxReportedPrinterRecords = 4; |
+ |
// The maximum number of command line switches to include in the crash |
// report's metadata. Note that the mini-dump itself will also contain the |
// (original) command line arguments within the PEB. |
@@ -45,6 +48,7 @@ extern char g_gpu_device_id[]; |
extern char g_gpu_driver_ver[]; |
extern char g_gpu_ps_ver[]; |
extern char g_gpu_vs_ver[]; |
+extern char g_prn_info[]; |
Lei Zhang
2012/03/14 04:20:05
nit: alphabetical order.
Vitaly Buka (NO REVIEWS)
2012/03/14 20:37:42
Done.
|
extern char g_num_extensions[]; |
extern char g_num_switches[]; |
extern char g_num_views[]; |
@@ -82,6 +86,10 @@ void SetNumberOfViews(int number_of_views); |
// Sets the data on the gpu to send along with crash reports. |
void SetGpuInfo(const content::GPUInfo& gpu_info); |
+// Sets the data on the printer to send along with crash reports. Data may be |
+// separated by ';' up to kMaxReportedPrinterRecords strings. |
eroman
2012/03/14 02:12:49
There is also a limit on the length of these strin
Vitaly Buka (NO REVIEWS)
2012/03/14 20:37:42
Done.
|
+void SetPrinterInfo(const char* printer_info); |
+ |
// Sets the command line arguments to send along with crash reports to the |
// values in |command_line|. |
void SetCommandLine(const CommandLine* command_line); |
@@ -107,6 +115,21 @@ class ScopedActiveURLSetter { |
DISALLOW_COPY_AND_ASSIGN(ScopedActiveURLSetter); |
}; |
+// Set/clear information about currently accessed printer. |
+class ScopedPrinterInfoSetter { |
+ public: |
+ explicit ScopedPrinterInfoSetter(const char* printer_info) { |
+ SetPrinterInfo(printer_info); |
+ } |
+ |
+ ~ScopedPrinterInfoSetter() { |
+ SetPrinterInfo(""); |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ScopedPrinterInfoSetter); |
+}; |
+ |
} // namespace child_process_logging |
#if defined(OS_MACOSX) |