| Index: printing/backend/win_helper.h
|
| diff --git a/printing/backend/win_helper.h b/printing/backend/win_helper.h
|
| index 0f6b7ef80855ad31b501a81ba90f49f7ddb8e0b0..db66bf89c4822c94aab94a7c41dd4501d7f0e4ab 100644
|
| --- a/printing/backend/win_helper.h
|
| +++ b/printing/backend/win_helper.h
|
| @@ -46,9 +46,10 @@ class ScopedPrinterHandle
|
| base::win::VerifierTraits> {
|
| public:
|
| bool OpenPrinter(const wchar_t* printer) {
|
| + HANDLE temp_handle;
|
| // ::OpenPrinter may return error but assign some value into handle.
|
| - if (!::OpenPrinter(const_cast<LPTSTR>(printer), Receive(), NULL)) {
|
| - Take();
|
| + if (::OpenPrinter(const_cast<LPTSTR>(printer), &temp_handle, NULL)) {
|
| + Set(temp_handle);
|
| }
|
| return IsValid();
|
| }
|
| @@ -56,10 +57,6 @@ class ScopedPrinterHandle
|
| private:
|
| typedef base::win::GenericScopedHandle<PrinterHandleTraits,
|
| base::win::VerifierTraits> Base;
|
| - // Hide Receive to avoid assigning handle when ::OpenPrinter returned error.
|
| - Base::Receiver Receive() {
|
| - return Base::Receive();
|
| - }
|
| };
|
|
|
| class PrinterChangeHandleTraits {
|
|
|