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

Unified Diff: base/pickle.h

Issue 1492403002: Remove kuint32max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http security header file 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 | « base/basictypes.h ('k') | base/pickle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.h
diff --git a/base/pickle.h b/base/pickle.h
index 22b8055cbae869a2d9549a385fbdc42363d6d0b3..72b33ddc979a50a3f8fc0ecbd628889212f99a78 100644
--- a/base/pickle.h
+++ b/base/pickle.h
@@ -5,10 +5,11 @@
#ifndef BASE_PICKLE_H_
#define BASE_PICKLE_H_
+#include <stdint.h>
+
#include <string>
#include "base/base_export.h"
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/logging.h"
@@ -34,10 +35,10 @@ class BASE_EXPORT PickleIterator {
bool ReadBool(bool* result) WARN_UNUSED_RESULT;
bool ReadInt(int* result) WARN_UNUSED_RESULT;
bool ReadLong(long* result) WARN_UNUSED_RESULT;
- bool ReadUInt16(uint16* result) WARN_UNUSED_RESULT;
- bool ReadUInt32(uint32* result) WARN_UNUSED_RESULT;
- bool ReadInt64(int64* result) WARN_UNUSED_RESULT;
- bool ReadUInt64(uint64* result) WARN_UNUSED_RESULT;
+ bool ReadUInt16(uint16_t* result) WARN_UNUSED_RESULT;
+ bool ReadUInt32(uint32_t* result) WARN_UNUSED_RESULT;
+ bool ReadInt64(int64_t* result) WARN_UNUSED_RESULT;
+ bool ReadUInt64(uint64_t* result) WARN_UNUSED_RESULT;
bool ReadSizeT(size_t* result) WARN_UNUSED_RESULT;
bool ReadFloat(float* result) WARN_UNUSED_RESULT;
bool ReadDouble(double* result) WARN_UNUSED_RESULT;
@@ -179,22 +180,14 @@ class BASE_EXPORT Pickle {
bool WriteLongUsingDangerousNonPortableLessPersistableForm(long value) {
return WritePOD(value);
}
- bool WriteUInt16(uint16 value) {
- return WritePOD(value);
- }
- bool WriteUInt32(uint32 value) {
- return WritePOD(value);
- }
- bool WriteInt64(int64 value) {
- return WritePOD(value);
- }
- bool WriteUInt64(uint64 value) {
- return WritePOD(value);
- }
+ bool WriteUInt16(uint16_t value) { return WritePOD(value); }
+ bool WriteUInt32(uint32_t value) { return WritePOD(value); }
+ bool WriteInt64(int64_t value) { return WritePOD(value); }
+ bool WriteUInt64(uint64_t value) { return WritePOD(value); }
bool WriteSizeT(size_t value) {
// Always write size_t as a 64-bit value to ensure compatibility between
// 32-bit and 64-bit processes.
- return WritePOD(static_cast<uint64>(value));
+ return WritePOD(static_cast<uint64_t>(value));
}
bool WriteFloat(float value) {
return WritePOD(value);
@@ -219,7 +212,7 @@ class BASE_EXPORT Pickle {
// Payload follows after allocation of Header (header size is customizable).
struct Header {
- uint32 payload_size; // Specifies the size of the payload.
+ uint32_t payload_size; // Specifies the size of the payload.
};
// Returns the header, cast to a user-specified type T. The type T must be a
« no previous file with comments | « base/basictypes.h ('k') | base/pickle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698