diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 08:53:24 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 08:53:24 +0000 |
commit | 19a12a1f568c2b16a0d2ebdd52c7d286858acdce (patch) | |
tree | cd8e05d9d71e9a3c3c11575724ca872e5301d975 /chrome/common/child_process_logging.h | |
parent | ebb7c1fd09da624d9cd44570ff8086e5051b1811 (diff) | |
download | chromium_src-19a12a1f568c2b16a0d2ebdd52c7d286858acdce.zip chromium_src-19a12a1f568c2b16a0d2ebdd52c7d286858acdce.tar.gz chromium_src-19a12a1f568c2b16a0d2ebdd52c7d286858acdce.tar.bz2 |
Added SetPrinterInfo to include information about printer driver. This information will be added by Chrome (in different CL) just before performing error-prone printer related operations.
BUG=108194
TEST=none
Review URL: http://codereview.chromium.org/9600060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging.h')
-rw-r--r-- | chrome/common/child_process_logging.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/common/child_process_logging.h b/chrome/common/child_process_logging.h index 6b68d8c..15a5b92 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. @@ -48,6 +51,7 @@ extern char g_gpu_vs_ver[]; extern char g_num_extensions[]; extern char g_num_switches[]; extern char g_num_views[]; +extern char g_prn_info[]; extern char g_switches[]; // Assume IDs are 32 bytes long. @@ -55,6 +59,9 @@ static const size_t kExtensionLen = 32; // Assume command line switches are less than 64 chars. static const size_t kSwitchLen = 64; + +// Assume printer info strings are less than 64 chars. +static const size_t kPrinterInfoStrLen = 64; #endif // Sets the URL that is logged if the child process crashes. Use GURL() to clear @@ -82,6 +89,11 @@ 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. Each substring +// would be cut to 63 chars. +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 +119,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) |