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

Unified Diff: net/disk_cache/blockfile/addr.h

Issue 1477533002: Remove kint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8max
Patch Set: includes Created 5 years, 1 month 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 | « media/cast/test/utility/generate_timecode_audio.cc ('k') | net/disk_cache/blockfile/block_files.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/addr.h
diff --git a/net/disk_cache/blockfile/addr.h b/net/disk_cache/blockfile/addr.h
index a5e4367757b54c41c7df93eedefbbd0a16678350..cf6071ed9deeab9f2b43b2800cd3700c84a57ef7 100644
--- a/net/disk_cache/blockfile/addr.h
+++ b/net/disk_cache/blockfile/addr.h
@@ -8,6 +8,9 @@
#ifndef NET_DISK_CACHE_BLOCKFILE_ADDR_H_
#define NET_DISK_CACHE_BLOCKFILE_ADDR_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include "net/base/net_export.h"
#include "net/disk_cache/blockfile/disk_format_base.h"
@@ -25,9 +28,9 @@ enum FileType {
};
const int kMaxBlockSize = 4096 * 4;
-const int16 kMaxBlockFile = 255;
+const int16_t kMaxBlockFile = 255;
const int kMaxNumBlocks = 4;
-const int16 kFirstAdditionalBlockFile = 4;
+const int16_t kFirstAdditionalBlockFile = 4;
const size_t kFirstAdditionalBlockFileV3 = 7;
// Defines a storage address for a cache record
@@ -165,20 +168,18 @@ class NET_EXPORT_PRIVATE Addr {
bool SanityCheckForRankings() const;
private:
- uint32 reserved_bits() const {
- return value_ & kReservedBitsMask;
- }
-
- static const uint32 kInitializedMask = 0x80000000;
- static const uint32 kFileTypeMask = 0x70000000;
- static const uint32 kFileTypeOffset = 28;
- static const uint32 kReservedBitsMask = 0x0c000000;
- static const uint32 kNumBlocksMask = 0x03000000;
- static const uint32 kNumBlocksOffset = 24;
- static const uint32 kFileSelectorMask = 0x00ff0000;
- static const uint32 kFileSelectorOffset = 16;
- static const uint32 kStartBlockMask = 0x0000FFFF;
- static const uint32 kFileNameMask = 0x0FFFFFFF;
+ uint32_t reserved_bits() const { return value_ & kReservedBitsMask; }
+
+ static const uint32_t kInitializedMask = 0x80000000;
+ static const uint32_t kFileTypeMask = 0x70000000;
+ static const uint32_t kFileTypeOffset = 28;
+ static const uint32_t kReservedBitsMask = 0x0c000000;
+ static const uint32_t kNumBlocksMask = 0x03000000;
+ static const uint32_t kNumBlocksOffset = 24;
+ static const uint32_t kFileSelectorMask = 0x00ff0000;
+ static const uint32_t kFileSelectorOffset = 16;
+ static const uint32_t kStartBlockMask = 0x0000FFFF;
+ static const uint32_t kFileNameMask = 0x0FFFFFFF;
CacheAddr value_;
};
« no previous file with comments | « media/cast/test/utility/generate_timecode_audio.cc ('k') | net/disk_cache/blockfile/block_files.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698