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

Unified Diff: storage/common/data_element.cc

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
Patch Set: rebase 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
Index: storage/common/data_element.cc
diff --git a/storage/common/data_element.cc b/storage/common/data_element.cc
index fe003ebf89e788b9dbcf5c8312d99a95337b19c4..8b1fc4dab7ec3fbf243542cbf353b03f26e43331 100644
--- a/storage/common/data_element.cc
+++ b/storage/common/data_element.cc
@@ -14,14 +14,14 @@ DataElement::DataElement()
: type_(TYPE_UNKNOWN),
bytes_(NULL),
offset_(0),
- length_(kuint64max) {
-}
+ length_(std::numeric_limits<uint64_t>::max()) {}
DataElement::~DataElement() {}
void DataElement::SetToFilePathRange(
const base::FilePath& path,
- uint64 offset, uint64 length,
+ uint64_t offset,
+ uint64_t length,
const base::Time& expected_modification_time) {
type_ = TYPE_FILE;
path_ = path;
@@ -30,9 +30,9 @@ void DataElement::SetToFilePathRange(
expected_modification_time_ = expected_modification_time;
}
-void DataElement::SetToBlobRange(
- const std::string& blob_uuid,
- uint64 offset, uint64 length) {
+void DataElement::SetToBlobRange(const std::string& blob_uuid,
+ uint64_t offset,
+ uint64_t length) {
type_ = TYPE_BLOB;
blob_uuid_ = blob_uuid;
offset_ = offset;
@@ -41,7 +41,8 @@ void DataElement::SetToBlobRange(
void DataElement::SetToFileSystemUrlRange(
const GURL& filesystem_url,
- uint64 offset, uint64 length,
+ uint64_t offset,
+ uint64_t length,
const base::Time& expected_modification_time) {
type_ = TYPE_FILE_FILESYSTEM;
filesystem_url_ = filesystem_url;
@@ -50,18 +51,18 @@ void DataElement::SetToFileSystemUrlRange(
expected_modification_time_ = expected_modification_time;
}
-void DataElement::SetToDiskCacheEntryRange(uint64 offset, uint64 length) {
+void DataElement::SetToDiskCacheEntryRange(uint64_t offset, uint64_t length) {
type_ = TYPE_DISK_CACHE_ENTRY;
offset_ = offset;
length_ = length;
}
void PrintTo(const DataElement& x, std::ostream* os) {
- const uint64 kMaxDataPrintLength = 40;
+ const uint64_t kMaxDataPrintLength = 40;
*os << "<DataElement>{type: ";
switch (x.type()) {
case DataElement::TYPE_BYTES: {
- uint64 length = std::min(x.length(), kMaxDataPrintLength);
+ uint64_t length = std::min(x.length(), kMaxDataPrintLength);
*os << "TYPE_BYTES, data: ["
<< base::HexEncode(x.bytes(), static_cast<size_t>(length));
if (length < x.length()) {
« no previous file with comments | « storage/common/data_element.h ('k') | third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698