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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
index 90356a060b7b048f2294ec9ad736f7c7bccc5cc9..2846f17038be3e8e54ff38017ca90afa36807673 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
@@ -4,6 +4,9 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
@@ -44,7 +47,7 @@ const int kMediumBypassMaxSeconds = 300;
// Returns a random bypass duration between 1 and 5 minutes.
base::TimeDelta GetDefaultBypassDuration() {
- const int64 delta_ms =
+ const int64_t delta_ms =
base::RandInt(base::TimeDelta::FromMinutes(1).InMilliseconds(),
base::TimeDelta::FromMinutes(5).InMilliseconds());
return TimeDelta::FromMilliseconds(delta_ms);
@@ -110,7 +113,7 @@ bool ParseHeadersAndSetBypassDuration(const net::HttpResponseHeaders* headers,
if (value.size() > prefix.size()) {
if (base::StartsWith(value, prefix,
base::CompareCase::INSENSITIVE_ASCII)) {
- int64 seconds;
+ int64_t seconds;
if (!base::StringToInt64(
StringPiece(value.begin() + prefix.size(), value.end()),
&seconds) || seconds < 0) {

Powered by Google App Engine
This is Rietveld 408576698