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

Unified Diff: google_apis/gcm/engine/gservices_settings.cc

Issue 1548673002: Switch to standard integer types in google_apis/. (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
« no previous file with comments | « google_apis/gcm/engine/gservices_settings.h ('k') | google_apis/gcm/engine/gservices_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/gservices_settings.cc
diff --git a/google_apis/gcm/engine/gservices_settings.cc b/google_apis/gcm/engine/gservices_settings.cc
index 1e3cf59670962a5e18ecb392d0b9b4d39f4b5b8d..cde4d7fbb2ba56aaea7a19ccf70dd56534b91b96 100644
--- a/google_apis/gcm/engine/gservices_settings.cc
+++ b/google_apis/gcm/engine/gservices_settings.cc
@@ -4,8 +4,11 @@
#include "google_apis/gcm/engine/gservices_settings.h"
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/macros.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -24,8 +27,8 @@ const char kMCSSecurePortKey[] = "gcm_secure_port";
// The URL to get MCS registration IDs.
const char kRegistrationURLKey[] = "gcm_registration_url";
-const int64 kDefaultCheckinInterval = 2 * 24 * 60 * 60; // seconds = 2 days.
-const int64 kMinimumCheckinInterval = 12 * 60 * 60; // seconds = 12 hours.
+const int64_t kDefaultCheckinInterval = 2 * 24 * 60 * 60; // seconds = 2 days.
+const int64_t kMinimumCheckinInterval = 12 * 60 * 60; // seconds = 12 hours.
const char kDefaultCheckinURL[] = "https://android.clients.google.com/checkin";
const char kDefaultMCSHostname[] = "mtalk.google.com";
const int kDefaultMCSMainSecurePort = 5228;
@@ -61,12 +64,12 @@ bool VerifyCheckinInterval(
if (iter == settings.end())
return CanBeOmitted(kCheckinIntervalKey);
- int64 checkin_interval = kMinimumCheckinInterval;
+ int64_t checkin_interval = kMinimumCheckinInterval;
if (!base::StringToInt64(iter->second, &checkin_interval)) {
DVLOG(1) << "Failed to parse checkin interval: " << iter->second;
return false;
}
- if (checkin_interval == std::numeric_limits<int64>::max()) {
+ if (checkin_interval == std::numeric_limits<int64_t>::max()) {
DVLOG(1) << "Checkin interval is too big: " << checkin_interval;
return false;
}
@@ -264,7 +267,7 @@ void GServicesSettings::UpdateFromLoadResult(
}
base::TimeDelta GServicesSettings::GetCheckinInterval() const {
- int64 checkin_interval = kMinimumCheckinInterval;
+ int64_t checkin_interval = kMinimumCheckinInterval;
SettingsMap::const_iterator iter = settings_.find(kCheckinIntervalKey);
if (iter == settings_.end() ||
!base::StringToInt64(iter->second, &checkin_interval)) {
« no previous file with comments | « google_apis/gcm/engine/gservices_settings.h ('k') | google_apis/gcm/engine/gservices_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698