Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Unified Diff: trunk/src/chrome/common/child_process_logging_posix.cc

Issue 23503070: Revert 223610 "Set the printer info in crash reports using the c..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/common/child_process_logging_posix.cc
===================================================================
--- trunk/src/chrome/common/child_process_logging_posix.cc (revision 223612)
+++ trunk/src/chrome/common/child_process_logging_posix.cc (working copy)
@@ -23,6 +23,8 @@
// these strings to the browser.
char g_client_id[kClientIdSize];
+char g_printer_info[kPrinterInfoStrLen * kMaxReportedPrinterRecords + 1] = "";
+
static const size_t kNumSize = 32;
char g_num_switches[kNumSize] = "";
char g_num_variations[kNumSize] = "";
@@ -51,6 +53,20 @@
return std::string(g_client_id);
}
+void SetPrinterInfo(const char* printer_info) {
+ std::string printer_info_str;
+ std::vector<std::string> info;
+ base::SplitString(printer_info, L';', &info);
+ DCHECK_LE(info.size(), kMaxReportedPrinterRecords);
+ for (size_t i = 0; i < info.size(); ++i) {
+ printer_info_str += info[i];
+ // Truncate long switches, align short ones with spaces to be trimmed later.
+ printer_info_str.resize((i + 1) * kPrinterInfoStrLen, ' ');
+ }
+ base::strlcpy(g_printer_info, printer_info_str.c_str(),
+ arraysize(g_printer_info));
+}
+
void SetCommandLine(const CommandLine* command_line) {
const CommandLine::StringVector& argv = command_line->argv();
« no previous file with comments | « trunk/src/chrome/common/child_process_logging_mac.mm ('k') | trunk/src/chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698