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

Unified Diff: net/disk_cache/memory/mem_backend_impl.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef 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 | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/memory/mem_backend_impl.cc
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 9948660808a2a22e2996a678eabb80699ec04dd6..d7a7a16399f2ef868fb2c80280a43cfaae5a41b4 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -57,7 +57,7 @@ bool MemBackendImpl::Init() {
if (max_size_)
return true;
- int64 total_memory = base::SysInfo::AmountOfPhysicalMemory();
+ int64_t total_memory = base::SysInfo::AmountOfPhysicalMemory();
if (total_memory <= 0) {
max_size_ = kDefaultInMemoryCacheSize;
@@ -70,7 +70,7 @@ bool MemBackendImpl::Init() {
if (total_memory > kDefaultInMemoryCacheSize * 5)
max_size_ = kDefaultInMemoryCacheSize * 5;
else
- max_size_ = static_cast<int32>(total_memory);
+ max_size_ = static_cast<int32_t>(total_memory);
return true;
}
@@ -107,7 +107,7 @@ void MemBackendImpl::UpdateRank(MemEntryImpl* node) {
rankings_.UpdateRank(node);
}
-void MemBackendImpl::ModifyStorageSize(int32 old_size, int32 new_size) {
+void MemBackendImpl::ModifyStorageSize(int32_t old_size, int32_t new_size) {
if (old_size >= new_size)
SubstractStorageSize(old_size - new_size);
else
@@ -130,8 +130,8 @@ net::CacheType MemBackendImpl::GetCacheType() const {
return net::MEMORY_CACHE;
}
-int32 MemBackendImpl::GetEntryCount() const {
- return static_cast<int32>(entries_.size());
+int32_t MemBackendImpl::GetEntryCount() const {
+ return static_cast<int32_t>(entries_.size());
}
int MemBackendImpl::OpenEntry(const std::string& key, Entry** entry,
@@ -335,7 +335,7 @@ void MemBackendImpl::TrimCache(bool empty) {
return;
}
-void MemBackendImpl::AddStorageSize(int32 bytes) {
+void MemBackendImpl::AddStorageSize(int32_t bytes) {
current_size_ += bytes;
DCHECK_GE(current_size_, 0);
@@ -343,7 +343,7 @@ void MemBackendImpl::AddStorageSize(int32 bytes) {
TrimCache(false);
}
-void MemBackendImpl::SubstractStorageSize(int32 bytes) {
+void MemBackendImpl::SubstractStorageSize(int32_t bytes) {
current_size_ -= bytes;
DCHECK_GE(current_size_, 0);
}
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/memory/mem_entry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698