diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-17 14:44:52 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-17 14:44:52 +0000 |
commit | dc04750a4da2b15e07c4cfc8b22ac53460e9f3cd (patch) | |
tree | 8399b1e1226b690d2c39de8dcf120e7dd6d9e88c /chrome/common/child_process_logging_mac.mm | |
parent | 2c84baa742b7610eff54d26c83eaf45e724ecdbd (diff) | |
download | chromium_src-dc04750a4da2b15e07c4cfc8b22ac53460e9f3cd.zip chromium_src-dc04750a4da2b15e07c4cfc8b22ac53460e9f3cd.tar.gz chromium_src-dc04750a4da2b15e07c4cfc8b22ac53460e9f3cd.tar.bz2 |
Revert 223610 "Set the printer info in crash reports using the c..."
Reverting due to buffer overflow reported on the Linux mem bot.
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%283%29/builds/15489
> Set the printer info in crash reports using the crash key logging system.
>
> BUG=77656
> R=jochen@chromium.org
>
> Review URL: https://codereview.chromium.org/23604061
TBR=rsesek@chromium.org
Review URL: https://codereview.chromium.org/23503070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_mac.mm')
-rw-r--r-- | chrome/common/child_process_logging_mac.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/common/child_process_logging_mac.mm b/chrome/common/child_process_logging_mac.mm index a0b03b1..a6ac715 100644 --- a/chrome/common/child_process_logging_mac.mm +++ b/chrome/common/child_process_logging_mac.mm @@ -23,6 +23,7 @@ using base::debug::SetCrashKeyValue; 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 @@ std::string GetClientId() { 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) |