Index: storage/common/data_element.h |
diff --git a/storage/common/data_element.h b/storage/common/data_element.h |
index 8376751bf14b627be06327aa917224c96fc0a4d5..2e9ce9c32ecfacf1a120cee0009ab413e9497140 100644 |
--- a/storage/common/data_element.h |
+++ b/storage/common/data_element.h |
@@ -5,11 +5,13 @@ |
#ifndef STORAGE_COMMON_DATA_ELEMENT_H_ |
#define STORAGE_COMMON_DATA_ELEMENT_H_ |
+#include <stdint.h> |
+ |
+#include <limits> |
#include <ostream> |
#include <string> |
#include <vector> |
-#include "base/basictypes.h" |
#include "base/files/file_path.h" |
#include "base/gtest_prod_util.h" |
#include "base/logging.h" |
@@ -42,8 +44,8 @@ class STORAGE_COMMON_EXPORT DataElement { |
const base::FilePath& path() const { return path_; } |
const GURL& filesystem_url() const { return filesystem_url_; } |
const std::string& blob_uuid() const { return blob_uuid_; } |
- uint64 offset() const { return offset_; } |
- uint64 length() const { return length_; } |
+ uint64_t offset() const { return offset_; } |
+ uint64_t length() const { return length_; } |
const base::Time& expected_modification_time() const { |
return expected_modification_time_; |
} |
@@ -73,7 +75,7 @@ class STORAGE_COMMON_EXPORT DataElement { |
// SetToBytes must be called before this method. |
void AppendBytes(const char* bytes, int bytes_len) { |
DCHECK_EQ(type_, TYPE_BYTES); |
- DCHECK_NE(length_, kuint64max); |
+ DCHECK_NE(length_, std::numeric_limits<uint64_t>::max()); |
DCHECK(!bytes_); |
buf_.insert(buf_.end(), bytes, bytes + bytes_len); |
length_ = buf_.size(); |
@@ -106,30 +108,34 @@ class STORAGE_COMMON_EXPORT DataElement { |
// Sets TYPE_FILE data. |
void SetToFilePath(const base::FilePath& path) { |
- SetToFilePathRange(path, 0, kuint64max, base::Time()); |
+ SetToFilePathRange(path, 0, std::numeric_limits<uint64_t>::max(), |
+ base::Time()); |
} |
// Sets TYPE_BLOB data. |
void SetToBlob(const std::string& uuid) { |
- SetToBlobRange(uuid, 0, kuint64max); |
+ SetToBlobRange(uuid, 0, std::numeric_limits<uint64_t>::max()); |
} |
// Sets TYPE_FILE data with range. |
void SetToFilePathRange(const base::FilePath& path, |
- uint64 offset, uint64 length, |
+ uint64_t offset, |
+ uint64_t length, |
const base::Time& expected_modification_time); |
// Sets TYPE_BLOB data with range. |
void SetToBlobRange(const std::string& blob_uuid, |
- uint64 offset, uint64 length); |
+ uint64_t offset, |
+ uint64_t length); |
// Sets TYPE_FILE_FILESYSTEM with range. |
void SetToFileSystemUrlRange(const GURL& filesystem_url, |
- uint64 offset, uint64 length, |
+ uint64_t offset, |
+ uint64_t length, |
const base::Time& expected_modification_time); |
// Sets to TYPE_DISK_CACHE_ENTRY with range. |
- void SetToDiskCacheEntryRange(uint64 offset, uint64 length); |
+ void SetToDiskCacheEntryRange(uint64_t offset, uint64_t length); |
private: |
FRIEND_TEST_ALL_PREFIXES(BlobAsyncTransportStrategyTest, TestInvalidParams); |
@@ -141,8 +147,8 @@ class STORAGE_COMMON_EXPORT DataElement { |
base::FilePath path_; // For TYPE_FILE. |
GURL filesystem_url_; // For TYPE_FILE_FILESYSTEM. |
std::string blob_uuid_; |
- uint64 offset_; |
- uint64 length_; |
+ uint64_t offset_; |
+ uint64_t length_; |
base::Time expected_modification_time_; |
}; |