diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 02:21:11 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 02:21:11 +0000 |
commit | ed05893e5bad87fb25ba8ce3b74426ad747e24bd (patch) | |
tree | ae497b532b3d8856ecba3f53ae46ddf1b6b16b40 /chrome/service/cloud_print/print_system_win.cc | |
parent | 421982855791701464fca867481c5d8193f5ec87 (diff) | |
download | chromium_src-ed05893e5bad87fb25ba8ce3b74426ad747e24bd.zip chromium_src-ed05893e5bad87fb25ba8ce3b74426ad747e24bd.tar.gz chromium_src-ed05893e5bad87fb25ba8ce3b74426ad747e24bd.tar.bz2 |
Driver related info would be included into PrinterBasicInfo::options so it would be uploaded to cloud print backend.
BUG=118797
TEST=none
Review URL: http://codereview.chromium.org/9812002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/cloud_print/print_system_win.cc')
-rw-r--r-- | chrome/service/cloud_print/print_system_win.cc | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc index 048a3ab..b9d5c52 100644 --- a/chrome/service/cloud_print/print_system_win.cc +++ b/chrome/service/cloud_print/print_system_win.cc @@ -225,33 +225,7 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate { bool GetCurrentPrinterInfo(printing::PrinterBasicInfo* printer_info) { DCHECK(printer_info); - if (!printer_.IsValid()) - return false; - - DWORD bytes_needed = 0; - bool ret = false; - GetPrinter(printer_, 2, NULL, 0, &bytes_needed); - if (0 != bytes_needed) { - scoped_array<BYTE> printer_info_buffer(new BYTE[bytes_needed]); - if (GetPrinter(printer_, 2, printer_info_buffer.get(), - bytes_needed, &bytes_needed)) { - PRINTER_INFO_2* printer_info_win = - reinterpret_cast<PRINTER_INFO_2*>(printer_info_buffer.get()); - printer_info->printer_name = WideToUTF8(printer_info_win->pPrinterName); - if (printer_info_win->pComment) - printer_info->printer_description = - WideToUTF8(printer_info_win->pComment); - if (printer_info_win->pLocation) - printer_info->options[kLocationTagName] = - WideToUTF8(printer_info_win->pLocation); - if (printer_info_win->pDriverName) - printer_info->options[kDriverNameTagName] = - WideToUTF8(printer_info_win->pDriverName); - printer_info->printer_status = printer_info_win->Status; - ret = true; - } - } - return ret; + return InitBasicPrinterInfo(printer_, printer_info); } private: |