diff options
author | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 10:14:21 +0000 |
---|---|---|
committer | markusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 10:14:21 +0000 |
commit | a97a27e5977c934d687156ff7a3d8eb0ddcce059 (patch) | |
tree | 9e4d40c14147a480abc7edd81dcd797460980629 /chrome/app | |
parent | 7d59f908a82b9569e82eced3b39fe45fa7d99363 (diff) | |
download | chromium_src-a97a27e5977c934d687156ff7a3d8eb0ddcce059.zip chromium_src-a97a27e5977c934d687156ff7a3d8eb0ddcce059.tar.gz chromium_src-a97a27e5977c934d687156ff7a3d8eb0ddcce059.tar.bz2 |
Revert 126866 - Added SetPrinterInfo to include information about printer driver. This information will be added by Chrome (in different CL) just before performing error-prone printer related operations.
BUG=108194
TEST=none
Review URL: http://codereview.chromium.org/9600060
TBR=vitalybuka@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r-- | chrome/app/breakpad_linux.cc | 13 | ||||
-rw-r--r-- | chrome/app/breakpad_win.cc | 76 |
2 files changed, 26 insertions, 63 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc index eff3a12..4ab5f48 100644 --- a/chrome/app/breakpad_linux.cc +++ b/chrome/app/breakpad_linux.cc @@ -574,19 +574,6 @@ void HandleCrashDump(const BreakpadInfo& info) { false /* Don't strip whitespace. */); } - unsigned printer_info_len = - my_strlen(child_process_logging::g_printer_info); - if (printer_info_len) { - static const char printer_info_msg[] = "prn-info-"; - static const unsigned kMaxPrnInfoLen = - kMaxReportedPrinterRecords * child_process_logging::kPrinterInfoStrLen; - writer.AddPairDataInChunks(printer_info_msg, sizeof(printer_info_msg) - 1, - child_process_logging::g_printer_info, - std::min(printer_info_len, kMaxPrnInfoLen), - child_process_logging::kPrinterInfoStrLen, - true); - } - if (my_strlen(child_process_logging::g_num_switches)) { writer.AddPairString("num-switches", child_process_logging::g_num_switches); diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc index 6c0cdf7..9bd8e1e 100644 --- a/chrome/app/breakpad_win.cc +++ b/chrome/app/breakpad_win.cc @@ -74,7 +74,6 @@ static size_t g_num_of_extensions_offset; static size_t g_extension_ids_offset; static size_t g_client_id_offset; static size_t g_gpu_info_offset; -static size_t g_printer_info_offset; static size_t g_num_of_views_offset; static size_t g_num_switches_offset; static size_t g_switches_offset; @@ -258,29 +257,19 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path, base::StringPrintf(L"extension-%i", i + 1).c_str(), L"")); } - // Add empty values for the gpu_info. We'll put the actual values when we - // collect them at this location. + // Add empty values for the gpu_info. We'll put the actual values + // when we collect them at this location. g_gpu_info_offset = g_custom_entries->size(); - static const wchar_t* const kGpuEntries[] = { - L"gpu-venid", - L"gpu-devid", - L"gpu-driver", - L"gpu-psver", - L"gpu-vsver", - }; - for (size_t i = 0; i < arraysize(kGpuEntries); ++i) { - g_custom_entries->push_back( - google_breakpad::CustomInfoEntry(kGpuEntries[i], L"")); - } - - // Add empty values for the prn_info-*. We'll put the actual values when we - // collect them at this location. - g_printer_info_offset = g_custom_entries->size(); - for (size_t i = 0; i < kMaxReportedPrinterRecords; ++i) { - g_custom_entries->push_back( - google_breakpad::CustomInfoEntry( - base::StringPrintf(L"prn-info-%d", i + 1).c_str(), L"")); - } + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"gpu-venid", L"")); + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"gpu-devid", L"")); + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"gpu-driver", L"")); + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"gpu-psver", L"")); + g_custom_entries->push_back( + google_breakpad::CustomInfoEntry(L"gpu-vsver", L"")); // Read the id from registry. If reporting has never been enabled // the result will be empty string. Its OK since when user enables reporting @@ -498,34 +487,21 @@ extern "C" void __declspec(dllexport) __cdecl SetGpuInfo( if (!g_custom_entries) return; - const wchar_t* info[] = { - vendor_id, - device_id, - driver_version, - pixel_shader_version, - vertex_shader_version - }; - - for (size_t i = 0; i < arraysize(info); ++i) { - base::wcslcpy((*g_custom_entries)[g_gpu_info_offset + i].value, - info[i], - google_breakpad::CustomInfoEntry::kValueMaxLength); - } -} - -extern "C" void __declspec(dllexport) __cdecl SetPrinterInfo( - const wchar_t* printer_info) { - if (!g_custom_entries) - return; - std::vector<string16> info; - base::SplitString(printer_info, L';', &info); - DCHECK_LE(info.size(), kMaxReportedPrinterRecords); - info.resize(kMaxReportedPrinterRecords); - for (size_t i = 0; i < info.size(); ++i) { - base::wcslcpy((*g_custom_entries)[g_printer_info_offset + i].value, - info[i].c_str(), + base::wcslcpy((*g_custom_entries)[g_gpu_info_offset].value, + vendor_id, + google_breakpad::CustomInfoEntry::kValueMaxLength); + base::wcslcpy((*g_custom_entries)[g_gpu_info_offset+1].value, + device_id, + google_breakpad::CustomInfoEntry::kValueMaxLength); + base::wcslcpy((*g_custom_entries)[g_gpu_info_offset+2].value, + driver_version, + google_breakpad::CustomInfoEntry::kValueMaxLength); + base::wcslcpy((*g_custom_entries)[g_gpu_info_offset+3].value, + pixel_shader_version, + google_breakpad::CustomInfoEntry::kValueMaxLength); + base::wcslcpy((*g_custom_entries)[g_gpu_info_offset+4].value, + vertex_shader_version, google_breakpad::CustomInfoEntry::kValueMaxLength); - } } extern "C" void __declspec(dllexport) __cdecl SetNumberOfViews( |