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

Unified Diff: printing/backend/printing_info_win.cc

Issue 1544623002: Switch to standard integer types in printing/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 e759639857fa1a2def920607fb6bffa69eaf8490..d5b37cad106bb6ed1921c5b3cc2e4e23e0d89810 100644
--- a/printing/backend/printing_info_win.cc
+++ b/printing/backend/printing_info_win.cc
@@ -4,19 +4,21 @@
#include "printing/backend/printing_info_win.h"
+#include <stdint.h>
+
#include "base/logging.h"
namespace printing {
namespace internal {
-uint8* GetDriverInfo(HANDLE printer, int level) {
+uint8_t* GetDriverInfo(HANDLE printer, int level) {
DWORD size = 0;
::GetPrinterDriver(printer, NULL, level, NULL, 0, &size);
if (size == 0) {
return NULL;
}
- scoped_ptr<uint8[]> buffer(new uint8[size]);
+ scoped_ptr<uint8_t[]> buffer(new uint8_t[size]);
memset(buffer.get(), 0, size);
if (!::GetPrinterDriver(printer, NULL, level, buffer.get(), size, &size)) {
return NULL;
@@ -24,7 +26,7 @@ uint8* GetDriverInfo(HANDLE printer, int level) {
return buffer.release();
}
-uint8* GetPrinterInfo(HANDLE printer, int level) {
+uint8_t* GetPrinterInfo(HANDLE printer, int level) {
DWORD size = 0;
::GetPrinter(printer, level, NULL, 0, &size);
if (size == 0) {
@@ -32,7 +34,7 @@ uint8* GetPrinterInfo(HANDLE printer, int level) {
", error = " << GetLastError();
return NULL;
}
- scoped_ptr<uint8[]> buffer(new uint8[size]);
+ scoped_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