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

Unified Diff: chrome/browser/extensions/blob_reader.cc

Issue 1498003003: Remove kint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: INT64_MAX 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 | « chrome/browser/extensions/blob_reader.h ('k') | chrome/browser/internal_auth.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/blob_reader.cc
diff --git a/chrome/browser/extensions/blob_reader.cc b/chrome/browser/extensions/blob_reader.cc
index dbcc2126da1079190458d0c25a36b94305ee2efe..43edf0e18da285795ac63389e799675248a64313 100644
--- a/chrome/browser/extensions/blob_reader.cc
+++ b/chrome/browser/extensions/blob_reader.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/blob_reader.h"
+#include <limits>
+
#include "base/format_macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -35,11 +37,11 @@ BlobReader::BlobReader(Profile* profile,
BlobReader::~BlobReader() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); }
-void BlobReader::SetByteRange(int64 offset, int64 length) {
+void BlobReader::SetByteRange(int64_t offset, int64_t length) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
CHECK_GE(offset, 0);
CHECK_GT(length, 0);
- CHECK_LE(offset, kint64max - length);
+ CHECK_LE(offset, std::numeric_limits<int64_t>::max() - length);
net::HttpRequestHeaders headers;
headers.SetHeader(
@@ -58,7 +60,7 @@ void BlobReader::Start() {
void BlobReader::OnURLFetchComplete(const net::URLFetcher* source) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
scoped_ptr<std::string> response(new std::string);
- int64 first = 0, last = 0, length = 0;
+ int64_t first = 0, last = 0, length = 0;
source->GetResponseAsString(response.get());
source->GetResponseHeaders()->GetContentRange(&first, &last, &length);
callback_.Run(response.Pass(), length);
« no previous file with comments | « chrome/browser/extensions/blob_reader.h ('k') | chrome/browser/internal_auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698