Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: printing/backend/printing_info_win.cc

Issue 1863223002: Convert //printing to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/backend/printing_info_win.h ('k') | printing/backend/win_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/backend/printing_info_win.cc
diff --git a/printing/backend/printing_info_win.cc b/printing/backend/printing_info_win.cc
index d5b37cad106bb6ed1921c5b3cc2e4e23e0d89810..ab878c0e68baacf5981d6057204cae01ec8e2191 100644
--- a/printing/backend/printing_info_win.cc
+++ b/printing/backend/printing_info_win.cc
@@ -18,7 +18,7 @@ uint8_t* GetDriverInfo(HANDLE printer, int level) {
if (size == 0) {
return NULL;
}
- scoped_ptr<uint8_t[]> buffer(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> buffer(new uint8_t[size]);
memset(buffer.get(), 0, size);
if (!::GetPrinterDriver(printer, NULL, level, buffer.get(), size, &size)) {
return NULL;
@@ -34,7 +34,7 @@ uint8_t* GetPrinterInfo(HANDLE printer, int level) {
", error = " << GetLastError();
return NULL;
}
- scoped_ptr<uint8_t[]> buffer(new uint8_t[size]);
+ std::unique_ptr<uint8_t[]> buffer(new uint8_t[size]);
memset(buffer.get(), 0, size);
if (!::GetPrinter(printer, level, buffer.get(), size, &size)) {
LOG(WARNING) << "Failed to get PRINTER_INFO_" << level <<
« no previous file with comments | « printing/backend/printing_info_win.h ('k') | printing/backend/win_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698