Index: net/disk_cache/blockfile/sparse_control.cc |
diff --git a/net/disk_cache/blockfile/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc |
index 08d79a836bf8ff0f2f85b8330fd69bd6a8a22710..1de0d60cd11dfdc5f80683051b5a7aae849d392d 100644 |
--- a/net/disk_cache/blockfile/sparse_control.cc |
+++ b/net/disk_cache/blockfile/sparse_control.cc |
@@ -10,6 +10,7 @@ |
#include "base/format_macros.h" |
#include "base/location.h" |
#include "base/logging.h" |
+#include "base/macros.h" |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
@@ -46,8 +47,9 @@ const int kBlockSize = 1024; |
// If the entry is called entry_name, child entries will be named something |
// like Range_entry_name:XXX:YYY where XXX is the entry signature and YYY is the |
// number of the particular child. |
-std::string GenerateChildName(const std::string& base_name, int64 signature, |
- int64 child_id) { |
+std::string GenerateChildName(const std::string& base_name, |
+ int64_t signature, |
+ int64_t child_id) { |
return base::StringPrintf("Range_%s:%" PRIx64 ":%" PRIx64, base_name.c_str(), |
signature, child_id); |
} |
@@ -76,7 +78,7 @@ class ChildrenDeleter |
base::WeakPtr<disk_cache::BackendImpl> backend_; |
std::string name_; |
disk_cache::Bitmap children_map_; |
- int64 signature_; |
+ int64_t signature_; |
scoped_ptr<char[]> buffer_; |
DISALLOW_COPY_AND_ASSIGN(ChildrenDeleter); |
}; |
@@ -245,8 +247,11 @@ bool SparseControl::CouldBeSparse() const { |
return (entry_->GetDataSize(kSparseIndex) != 0); |
} |
-int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf, |
- int buf_len, const CompletionCallback& callback) { |
+int SparseControl::StartIO(SparseOperation op, |
+ int64_t offset, |
+ net::IOBuffer* buf, |
+ int buf_len, |
+ const CompletionCallback& callback) { |
DCHECK(init_); |
// We don't support simultaneous IO for sparse data. |
if (operation_ != kNoOperation) |
@@ -256,7 +261,7 @@ int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf, |
return net::ERR_INVALID_ARGUMENT; |
// We only support up to 64 GB. |
- if (static_cast<uint64>(offset) + static_cast<unsigned int>(buf_len) >= |
+ if (static_cast<uint64_t>(offset) + static_cast<unsigned int>(buf_len) >= |
UINT64_C(0x1000000000)) { |
return net::ERR_CACHE_OPERATION_NOT_SUPPORTED; |
} |
@@ -297,7 +302,7 @@ int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf, |
return net::ERR_IO_PENDING; |
} |
-int SparseControl::GetAvailableRange(int64 offset, int len, int64* start) { |
+int SparseControl::GetAvailableRange(int64_t offset, int len, int64_t* start) { |
DCHECK(init_); |
// We don't support simultaneous IO for sparse data. |
if (operation_ != kNoOperation) |
@@ -441,7 +446,7 @@ int SparseControl::OpenSparseEntry(int data_len) { |
// Grow the bitmap to the current size and copy the bits. |
children_map_.Resize(map_len * 8, false); |
- children_map_.SetMap(reinterpret_cast<uint32*>(buf->data()), map_len); |
+ children_map_.SetMap(reinterpret_cast<uint32_t*>(buf->data()), map_len); |
return net::OK; |
} |