Chromium Code Reviews| Index: chrome/common/child_process_logging_mac.mm |
| diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm |
| index 0541977bf55d7102349866ba91707d30af2d1845..43868021a2a37883436b4aa80e881504479a5d06 100644 |
| --- a/chrome/common/child_process_logging_mac.mm |
| +++ b/chrome/common/child_process_logging_mac.mm |
| @@ -8,6 +8,7 @@ |
| #include "base/command_line.h" |
| #include "base/string_number_conversions.h" |
| +#include "base/string_split.h" |
| #include "base/string_util.h" |
| #include "base/stringprintf.h" |
| #include "base/sys_string_conversions.h" |
| @@ -36,6 +37,7 @@ const char *kGPUGLVersionParamName = "gpu-glver"; |
| const char *kNumberOfViews = "num-views"; |
| NSString* const kNumExtensionsName = @"num-extensions"; |
| NSString* const kExtensionNameFormat = @"extension-%d"; |
| +NSString* const kPrinterInfoNameFormat = @"prn-info-%d"; |
| // Account for the terminating null character. |
| static const size_t kClientIdSize = 32 + 1; |
| @@ -163,6 +165,16 @@ void SetGpuInfo(const content::GPUInfo& gpu_info) { |
| SetGpuInfoImpl(gpu_info, SetCrashKeyValue); |
| } |
| +void SetPrinterInfo(const char* printer_info) { |
| + std::vector<std::string> info; |
| + base::SplitString(printer_info, L';', &info); |
| + info.resize(kMaxReportedPrinterRecords); |
| + for (size_t i = 0; i < info.size(); ++i) { |
| + NSString* key = [NSString stringWithFormat:kPrinterInfoNameFormat, i]; |
| + NSString *value = [NSString stringWithUTF8String:info[i].c_str()]; |
| + SetCrashKeyValue(key, value); |
|
Scott Hess - ex-Googler
2012/03/14 21:26:37
I _think_ this'll leave you with all N keys, every
Vitaly Buka (NO REVIEWS)
2012/03/14 21:37:33
Done.
|
| + } |
| +} |
| void SetNumberOfViewsImpl(int number_of_views, |
| SetCrashKeyValueFuncPtr set_key_func) { |