diff options
author | rvargas <rvargas@chromium.org> | 2014-09-24 18:35:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-25 01:35:52 +0000 |
commit | d7743bab4d428ef413320f9e71ed08b62255573b (patch) | |
tree | f08b5108358dee383e7ba0c3bbc243a175920b43 /chrome/service | |
parent | ae685fa448164fef86b0b97f519ac2f81cc8b310 (diff) | |
download | chromium_src-d7743bab4d428ef413320f9e71ed08b62255573b.zip chromium_src-d7743bab4d428ef413320f9e71ed08b62255573b.tar.gz chromium_src-d7743bab4d428ef413320f9e71ed08b62255573b.tar.bz2 |
Remove implicit HANDLE conversions from chrome.
BUG=416722
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/606473002
Cr-Commit-Position: refs/heads/master@{#296613}
Diffstat (limited to 'chrome/service')
-rw-r--r-- | chrome/service/cloud_print/cdd_conversion_win.cc | 7 | ||||
-rw-r--r-- | chrome/service/cloud_print/print_system_win.cc | 18 |
2 files changed, 13 insertions, 12 deletions
diff --git a/chrome/service/cloud_print/cdd_conversion_win.cc b/chrome/service/cloud_print/cdd_conversion_win.cc index 4ab9c46..04abd24 100644 --- a/chrome/service/cloud_print/cdd_conversion_win.cc +++ b/chrome/service/cloud_print/cdd_conversion_win.cc @@ -33,9 +33,10 @@ scoped_ptr<DEVMODE, base::FreeDeleter> CjtToDevMode( ColorTicketItem color; if (color.LoadFrom(description)) { bool is_color = color.value().type == STANDARD_COLOR; - dev_mode = CreateDevModeWithColor(printer, printer_name, is_color); + dev_mode = printing::CreateDevModeWithColor(printer.Get(), printer_name, + is_color); } else { - dev_mode = printing::CreateDevMode(printer, NULL); + dev_mode = printing::CreateDevMode(printer.Get(), NULL); } } @@ -124,7 +125,7 @@ scoped_ptr<DEVMODE, base::FreeDeleter> CjtToDevMode( } } - return printing::CreateDevMode(printer, dev_mode.get()); + return printing::CreateDevMode(printer.Get(), dev_mode.get()); } } // namespace cloud_print diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc index 4408c3c..3e83bea 100644 --- a/chrome/service/cloud_print/print_system_win.cc +++ b/chrome/service/cloud_print/print_system_win.cc @@ -68,9 +68,9 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate { bool ret = false; if (printer_.OpenPrinter(printer_name_to_use)) { printer_change_.Set(FindFirstPrinterChangeNotification( - printer_, PRINTER_CHANGE_PRINTER|PRINTER_CHANGE_JOB, 0, NULL)); + printer_.Get(), PRINTER_CHANGE_PRINTER|PRINTER_CHANGE_JOB, 0, NULL)); if (printer_change_.IsValid()) { - ret = watcher_.StartWatching(printer_change_, this); + ret = watcher_.StartWatching(printer_change_.Get(), this); } } if (!ret) { @@ -108,12 +108,12 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate { delegate_->OnJobChanged(); } } - watcher_.StartWatching(printer_change_, this); + watcher_.StartWatching(printer_change_.Get(), this); } bool GetCurrentPrinterInfo(printing::PrinterBasicInfo* printer_info) { DCHECK(printer_info); - return InitBasicPrinterInfo(printer_, printer_info); + return InitBasicPrinterInfo(printer_.Get(), printer_info); } private: @@ -153,7 +153,7 @@ class PrintServerWatcherWin virtual void OnPrinterChanged() OVERRIDE {} virtual void OnJobChanged() OVERRIDE {} - protected: + protected: virtual ~PrintServerWatcherWin() {} private: @@ -204,7 +204,7 @@ class PrinterWatcherWin delegate_->OnJobChanged(); } - protected: + protected: virtual ~PrinterWatcherWin() {} private: @@ -752,14 +752,14 @@ bool PrintSystemWin::GetJobDetails(const std::string& printer_name, bool ret = false; if (printer_handle.IsValid()) { DWORD bytes_needed = 0; - GetJob(printer_handle, job_id, 1, NULL, 0, &bytes_needed); + GetJob(printer_handle.Get(), job_id, 1, NULL, 0, &bytes_needed); DWORD last_error = GetLastError(); if (ERROR_INVALID_PARAMETER != last_error) { // ERROR_INVALID_PARAMETER normally means that the job id is not valid. DCHECK(last_error == ERROR_INSUFFICIENT_BUFFER); scoped_ptr<BYTE[]> job_info_buffer(new BYTE[bytes_needed]); - if (GetJob(printer_handle, job_id, 1, job_info_buffer.get(), bytes_needed, - &bytes_needed)) { + if (GetJob(printer_handle.Get(), job_id, 1, job_info_buffer.get(), + bytes_needed, &bytes_needed)) { JOB_INFO_1 *job_info = reinterpret_cast<JOB_INFO_1 *>(job_info_buffer.get()); if (job_info->pStatus) { |