Index: trunk/src/chrome/common/child_process_logging_mac.mm |
=================================================================== |
--- trunk/src/chrome/common/child_process_logging_mac.mm (revision 223612) |
+++ trunk/src/chrome/common/child_process_logging_mac.mm (working copy) |
@@ -23,6 +23,7 @@ |
using base::debug::ClearCrashKey; |
const char* kGuidParamName = "guid"; |
+const char* kPrinterInfoNameFormat = "prn-info-%zu"; |
// Account for the terminating null character. |
static const size_t kClientIdSize = 32 + 1; |
@@ -48,6 +49,20 @@ |
return std::string(g_client_id); |
} |
+void SetPrinterInfo(const char* printer_info) { |
+ std::vector<std::string> info; |
+ base::SplitString(printer_info, ';', &info); |
+ info.resize(kMaxReportedPrinterRecords); |
+ for (size_t i = 0; i < info.size(); ++i) { |
+ std::string key = base::StringPrintf(kPrinterInfoNameFormat, i); |
+ if (!info[i].empty()) { |
+ SetCrashKeyValue(key, info[i]); |
+ } else { |
+ ClearCrashKey(key); |
+ } |
+ } |
+} |
+ |
void SetCommandLine(const CommandLine* command_line) { |
DCHECK(command_line); |
if (!command_line) |