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

Unified Diff: trunk/src/chrome/common/child_process_logging_win.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
« no previous file with comments | « trunk/src/chrome/common/child_process_logging_posix.cc ('k') | trunk/src/chrome/common/crash_keys.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/common/child_process_logging_win.cc
===================================================================
--- trunk/src/chrome/common/child_process_logging_win.cc (revision 223612)
+++ trunk/src/chrome/common/child_process_logging_win.cc (working copy)
@@ -23,6 +23,10 @@
typedef void (__cdecl *MainSetClientId)(const wchar_t*);
// exported in breakpad_win.cc:
+// void __declspec(dllexport) __cdecl SetPrinterInfo.
+typedef void (__cdecl *MainSetPrinterInfo)(const wchar_t*);
+
+// exported in breakpad_win.cc:
// void __declspec(dllexport) __cdecl SetCommandLine2
typedef void (__cdecl *MainSetCommandLine)(const wchar_t**, size_t);
@@ -86,6 +90,21 @@
return std::string();
}
+void SetPrinterInfo(const char* printer_info) {
+ static MainSetPrinterInfo set_printer_info = NULL;
+ // note: benign race condition on set_printer_info.
+ if (!set_printer_info) {
+ HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+ if (!exe_module)
+ return;
+ set_printer_info = reinterpret_cast<MainSetPrinterInfo>(
+ GetProcAddress(exe_module, "SetPrinterInfo"));
+ if (!set_printer_info)
+ return;
+ }
+ (set_printer_info)(UTF8ToWide(printer_info).c_str());
+}
+
void SetCommandLine(const CommandLine* command_line) {
static MainSetCommandLine set_command_line = NULL;
// note: benign race condition on set_command_line.
« no previous file with comments | « trunk/src/chrome/common/child_process_logging_posix.cc ('k') | trunk/src/chrome/common/crash_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698