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

Unified Diff: content/child/web_url_request_util.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: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index cf46ed417866e060ceb18bfb8f36ac0e1f2691fb..037e761c3ed08af849d2a5101a5fae4d28ed5a27 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -4,6 +4,10 @@
#include "content/child/web_url_request_util.h"
+#include <stdint.h>
+
+#include <limits>
+
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "net/base/load_flags.h"
@@ -245,13 +249,13 @@ scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
case WebHTTPBody::Element::TypeFile:
if (element.fileLength == -1) {
request_body->AppendFileRange(
- base::FilePath::FromUTF16Unsafe(element.filePath),
- 0, kuint64max, base::Time());
+ base::FilePath::FromUTF16Unsafe(element.filePath), 0,
+ std::numeric_limits<uint64_t>::max(), base::Time());
} else {
request_body->AppendFileRange(
base::FilePath::FromUTF16Unsafe(element.filePath),
- static_cast<uint64>(element.fileStart),
- static_cast<uint64>(element.fileLength),
+ static_cast<uint64_t>(element.fileStart),
+ static_cast<uint64_t>(element.fileLength),
base::Time::FromDoubleT(element.modificationTime));
}
break;
@@ -259,9 +263,8 @@ scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
GURL file_system_url = element.fileSystemURL;
DCHECK(file_system_url.SchemeIsFileSystem());
request_body->AppendFileSystemFileRange(
- file_system_url,
- static_cast<uint64>(element.fileStart),
- static_cast<uint64>(element.fileLength),
+ file_system_url, static_cast<uint64_t>(element.fileStart),
+ static_cast<uint64_t>(element.fileLength),
base::Time::FromDoubleT(element.modificationTime));
break;
}

Powered by Google App Engine
This is Rietveld 408576698