summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
Diffstat (limited to 'printing')
-rw-r--r--printing/backend/print_backend_win.cc4
-rw-r--r--printing/backend/printing_info_win.cc4
-rw-r--r--printing/backend/printing_info_win.h4
-rw-r--r--printing/printing_context_win.cc4
-rw-r--r--printing/printing_context_win_unittest.cc2
5 files changed, 9 insertions, 9 deletions
diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc
index 76b68fa..c52d2e9 100644
--- a/printing/backend/print_backend_win.cc
+++ b/printing/backend/print_backend_win.cc
@@ -67,7 +67,7 @@ bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) {
kLevel, NULL, 0, &bytes_needed, &count_returned);
if (!bytes_needed)
return false;
- scoped_array<BYTE> printer_info_buffer(new BYTE[bytes_needed]);
+ scoped_ptr<BYTE[]> printer_info_buffer(new BYTE[bytes_needed]);
ret = EnumPrinters(PRINTER_ENUM_LOCAL|PRINTER_ENUM_CONNECTIONS, NULL, kLevel,
printer_info_buffer.get(), bytes_needed, &bytes_needed,
&count_returned);
@@ -208,7 +208,7 @@ bool PrintBackendWin::GetPrinterCapsAndDefaults(
NULL, NULL, 0);
if (devmode_size <= 0)
return false;
- scoped_array<BYTE> devmode_out_buffer(new BYTE[devmode_size]);
+ scoped_ptr<BYTE[]> devmode_out_buffer(new BYTE[devmode_size]);
DEVMODE* devmode_out =
reinterpret_cast<DEVMODE*>(devmode_out_buffer.get());
DocumentProperties(
diff --git a/printing/backend/printing_info_win.cc b/printing/backend/printing_info_win.cc
index 0ee0fcd..0e45094 100644
--- a/printing/backend/printing_info_win.cc
+++ b/printing/backend/printing_info_win.cc
@@ -16,7 +16,7 @@ uint8* GetDriverInfo(HANDLE printer, int level) {
if (size == 0) {
return NULL;
}
- scoped_array<uint8> buffer(new uint8[size]);
+ scoped_ptr<uint8[]> buffer(new uint8[size]);
memset(buffer.get(), 0, size);
if (!::GetPrinterDriver(printer, NULL, level, buffer.get(), size, &size)) {
return NULL;
@@ -32,7 +32,7 @@ uint8* GetPrinterInfo(HANDLE printer, int level) {
", error = " << GetLastError();
return NULL;
}
- scoped_array<uint8> buffer(new uint8[size]);
+ scoped_ptr<uint8[]> buffer(new uint8[size]);
memset(buffer.get(), 0, size);
if (!::GetPrinter(printer, level, buffer.get(), size, &size)) {
LOG(WARNING) << "Failed to get PRINTER_INFO_" << level <<
diff --git a/printing/backend/printing_info_win.h b/printing/backend/printing_info_win.h
index 1e9afd9..931ae6d 100644
--- a/printing/backend/printing_info_win.h
+++ b/printing/backend/printing_info_win.h
@@ -33,7 +33,7 @@ class PrinterInfo {
}
private:
- scoped_array<uint8> buffer_;
+ scoped_ptr<uint8[]> buffer_;
};
// This class is designed to work with DRIVER_INFO_X structures
@@ -51,7 +51,7 @@ class DriverInfo {
}
private:
- scoped_array<uint8> buffer_;
+ scoped_ptr<uint8[]> buffer_;
};
} // namespace internal
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index c60c7b8..ddfae1a 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -261,7 +261,7 @@ PrintingContext::Result PrintingContextWin::UseDefaultSettings() {
NULL, 2, NULL, 0, &bytes_needed, &count_returned);
if (bytes_needed) {
DCHECK(bytes_needed >= count_returned * sizeof(PRINTER_INFO_2));
- scoped_array<BYTE> printer_info_buffer(new BYTE[bytes_needed]);
+ scoped_ptr<BYTE[]> printer_info_buffer(new BYTE[bytes_needed]);
BOOL ret = ::EnumPrinters(PRINTER_ENUM_LOCAL|PRINTER_ENUM_CONNECTIONS,
NULL, 2, printer_info_buffer.get(),
bytes_needed, &bytes_needed,
@@ -360,7 +360,7 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
// Make printer changes local to Chrome.
// See MSDN documentation regarding DocumentProperties.
- scoped_array<uint8> buffer;
+ scoped_ptr<uint8[]> buffer;
DEVMODE* dev_mode = NULL;
LONG buffer_size = DocumentProperties(NULL, printer, device_name_wide,
NULL, NULL, 0);
diff --git a/printing/printing_context_win_unittest.cc b/printing/printing_context_win_unittest.cc
index 2251e64..5c6d166 100644
--- a/printing/printing_context_win_unittest.cc
+++ b/printing/printing_context_win_unittest.cc
@@ -50,7 +50,7 @@ HRESULT WINAPI PrintDlgExMock(LPPRINTDLGEX lppd) {
if (!OpenPrinter(const_cast<wchar_t*>(printer_name.c_str()), &printer, NULL))
return E_FAIL;
- scoped_array<uint8> buffer;
+ scoped_ptr<uint8[]> buffer;
const DEVMODE* dev_mode = NULL;
HRESULT result = S_OK;
lppd->hDC = NULL;