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

Unified Diff: chrome/browser/sync/test/integration/retry_verifier.cc

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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: chrome/browser/sync/test/integration/retry_verifier.cc
diff --git a/chrome/browser/sync/test/integration/retry_verifier.cc b/chrome/browser/sync/test/integration/retry_verifier.cc
index 202b1f317fa10154c106f1fb39024da7e52016ad..7d82a23c30398846397b620909aaf78c07e8ba13 100644
--- a/chrome/browser/sync/test/integration/retry_verifier.cc
+++ b/chrome/browser/sync/test/integration/retry_verifier.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/sync/test/integration/retry_verifier.h"
+#include <string.h>
+
#include <algorithm>
#include "base/logging.h"
@@ -13,20 +15,23 @@
namespace {
// Given the current delay calculate the minimum and maximum wait times for
// the next retry.
-DelayInfo CalculateDelay(int64 current_delay) {
- int64 backoff_s = std::max(static_cast<int64>(1), current_delay *
- syncer::kBackoffRandomizationFactor);
+DelayInfo CalculateDelay(int64_t current_delay) {
+ int64_t backoff_s =
+ std::max(static_cast<int64_t>(1),
+ current_delay * syncer::kBackoffRandomizationFactor);
DelayInfo delay_info;
delay_info.min_delay = backoff_s + (-1 * current_delay/
syncer::kBackoffRandomizationFactor);
delay_info.max_delay = backoff_s + current_delay/2;
- delay_info.min_delay = std::max(static_cast<int64>(1),
- std::min(delay_info.min_delay, syncer::kMaxBackoffSeconds));
+ delay_info.min_delay =
+ std::max(static_cast<int64_t>(1),
+ std::min(delay_info.min_delay, syncer::kMaxBackoffSeconds));
- delay_info.max_delay = std::max(static_cast<int64>(1),
- std::min(delay_info.max_delay, syncer::kMaxBackoffSeconds));
+ delay_info.max_delay =
+ std::max(static_cast<int64_t>(1),
+ std::min(delay_info.max_delay, syncer::kMaxBackoffSeconds));
return delay_info;
}
@@ -37,8 +42,8 @@ void FillDelayTable(DelayInfo* delay_table, int count) {
DCHECK(count > 1);
// We start off with the minimum value of 2 seconds.
- delay_table[0].min_delay = static_cast<int64>(2);
- delay_table[0].max_delay = static_cast<int64>(2);
+ delay_table[0].min_delay = static_cast<int64_t>(2);
+ delay_table[0].max_delay = static_cast<int64_t>(2);
for (int i = 1 ; i < count ; ++i) {
delay_table[i].min_delay = CalculateDelay(delay_table[i-1].min_delay).
« no previous file with comments | « chrome/browser/sync/test/integration/retry_verifier.h ('k') | chrome/browser/sync/test/integration/search_engines_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698