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

Unified Diff: components/gcm_driver/instance_id/instance_id_impl.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn 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/gcm_driver/instance_id/instance_id_impl.cc
diff --git a/components/gcm_driver/instance_id/instance_id_impl.cc b/components/gcm_driver/instance_id/instance_id_impl.cc
index 998ad8593f7da75f847ddb0aea0616cb10ab2fc1..4871497bcbd3f369f1feb4b6fe1421df5b47e604 100644
--- a/components/gcm_driver/instance_id/instance_id_impl.cc
+++ b/components/gcm_driver/instance_id/instance_id_impl.cc
@@ -4,6 +4,8 @@
#include "components/gcm_driver/instance_id/instance_id_impl.h"
+#include <stdint.h>
+
#include <algorithm>
#include "base/base64.h"
#include "base/bind.h"
@@ -233,7 +235,7 @@ void InstanceIDImpl::GetInstanceIDDataCompleted(
if (extra_data.empty()) {
creation_time_ = base::Time();
} else {
- int64 time_internal = 0LL;
+ int64_t time_internal = 0LL;
if (!base::StringToInt64(extra_data, &time_internal)) {
DVLOG(1) << "Failed to parse the time data: " + extra_data;
return;
@@ -259,7 +261,7 @@ void InstanceIDImpl::EnsureIDGenerated() {
// 1) Generates the random number in 8 bytes which is required by the server.
// We don't want to be strictly cryptographically secure. The server might
// reject the ID if there is a conflict or problem.
- uint8 bytes[kInstanceIDByteLength];
+ uint8_t bytes[kInstanceIDByteLength];
crypto::RandBytes(bytes, sizeof(bytes));
// 2) Transforms the first 4 bits to 0x7. Note that this is required by the
« no previous file with comments | « components/gcm_driver/instance_id/instance_id_driver_unittest.cc ('k') | components/gcm_driver/registration_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698