diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 04:48:01 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 04:48:01 +0000 |
commit | fb3a97c2eaabc8d3e8dfc36dc7ed5e3fceae2646 (patch) | |
tree | 1506b6cb5a367e05ffb6f0d1eb4b41bb69e17d83 /printing | |
parent | fd895ffa0fe087656cc8294db14bc8031def805c (diff) | |
download | chromium_src-fb3a97c2eaabc8d3e8dfc36dc7ed5e3fceae2646.zip chromium_src-fb3a97c2eaabc8d3e8dfc36dc7ed5e3fceae2646.tar.gz chromium_src-fb3a97c2eaabc8d3e8dfc36dc7ed5e3fceae2646.tar.bz2 |
Rewrite scoped_array<T> to scoped_ptr<T[]> in printing.
This is a manual cleanup pass using sed for files which are not built on
Linux.
BUG=171111
Review URL: https://chromiumcodereview.appspot.com/14115002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193577 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/backend/print_backend_win.cc | 4 | ||||
-rw-r--r-- | printing/backend/printing_info_win.cc | 4 | ||||
-rw-r--r-- | printing/backend/printing_info_win.h | 4 | ||||
-rw-r--r-- | printing/printing_context_win.cc | 4 | ||||
-rw-r--r-- | printing/printing_context_win_unittest.cc | 2 |
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; |