summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2014-11-13 15:06:42 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-13 23:07:04 +0000
commitbe20825ffd218323b94626bb069a1980accf5289 (patch)
treeb10e031cdfca661788061eb6511972f3c8d241d0 /printing
parent51316e4fec43ffe4becc6ec3d92e265b816dc6e4 (diff)
downloadchromium_src-be20825ffd218323b94626bb069a1980accf5289.zip
chromium_src-be20825ffd218323b94626bb069a1980accf5289.tar.gz
chromium_src-be20825ffd218323b94626bb069a1980accf5289.tar.bz2
Remove implicit conversions from scoped_refptr to T* in printing/
This patch was generated by running the rewrite_scoped_refptr clang tool on a Windows build. BUG=110610 Review URL: https://codereview.chromium.org/723743003 Cr-Commit-Position: refs/heads/master@{#304105}
Diffstat (limited to 'printing')
-rw-r--r--printing/backend/print_backend_win.cc15
-rw-r--r--printing/backend/win_helper.cc10
2 files changed, 10 insertions, 15 deletions
diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc
index 0f5d096..a95c98b 100644
--- a/printing/backend/print_backend_win.cc
+++ b/printing/backend/print_backend_win.cc
@@ -304,12 +304,10 @@ bool PrintBackendWin::GetPrinterCapsAndDefaults(
hr = CreateStreamOnHGlobal(NULL, TRUE,
print_capabilities_stream.Receive());
DCHECK(SUCCEEDED(hr));
- if (print_capabilities_stream) {
+ if (print_capabilities_stream.get()) {
base::win::ScopedBstr error;
- hr = XPSModule::GetPrintCapabilities(provider,
- NULL,
- print_capabilities_stream,
- error.Receive());
+ hr = XPSModule::GetPrintCapabilities(
+ provider, NULL, print_capabilities_stream.get(), error.Receive());
DCHECK(SUCCEEDED(hr));
if (FAILED(hr)) {
return false;
@@ -329,10 +327,11 @@ bool PrintBackendWin::GetPrinterCapsAndDefaults(
hr = CreateStreamOnHGlobal(NULL, TRUE,
printer_defaults_stream.Receive());
DCHECK(SUCCEEDED(hr));
- if (printer_defaults_stream) {
+ if (printer_defaults_stream.get()) {
DWORD dm_size = devmode_out->dmSize + devmode_out->dmDriverExtra;
- hr = XPSModule::ConvertDevModeToPrintTicket(provider, dm_size,
- devmode_out.get(), kPTJobScope, printer_defaults_stream);
+ hr = XPSModule::ConvertDevModeToPrintTicket(
+ provider, dm_size, devmode_out.get(), kPTJobScope,
+ printer_defaults_stream.get());
DCHECK(SUCCEEDED(hr));
if (SUCCEEDED(hr)) {
hr = StreamOnHGlobalToString(printer_defaults_stream.get(),
diff --git a/printing/backend/win_helper.cc b/printing/backend/win_helper.cc
index 8996b34..8d75f20 100644
--- a/printing/backend/win_helper.cc
+++ b/printing/backend/win_helper.cc
@@ -410,13 +410,9 @@ scoped_ptr<DEVMODE, base::FreeDeleter> XpsTicketToDevMode(
ULONG size = 0;
DEVMODE* dm = NULL;
// Use kPTJobScope, because kPTDocumentScope breaks duplex.
- hr = printing::XPSModule::ConvertPrintTicketToDevMode(provider,
- pt_stream,
- kUserDefaultDevmode,
- kPTJobScope,
- &size,
- &dm,
- NULL);
+ hr = printing::XPSModule::ConvertPrintTicketToDevMode(
+ provider, pt_stream.get(), kUserDefaultDevmode, kPTJobScope, &size, &dm,
+ NULL);
if (SUCCEEDED(hr)) {
// Correct DEVMODE using DocumentProperties. See documentation for
// PTConvertPrintTicketToDevMode.