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

Unified Diff: sync/util/nigori.cc

Issue 1545553003: Switch to standard integer types in sync/. (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
« no previous file with comments | « sync/util/nigori.h ('k') | sync/util/time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/nigori.cc
diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc
index 225e07449b638b942c96681ae32f75dcb7e418a7..002f71802546d40ca459e7ef8d627afe616be621 100644
--- a/sync/util/nigori.cc
+++ b/sync/util/nigori.cc
@@ -4,6 +4,8 @@
#include "sync/util/nigori.h"
+#include <stdint.h>
+
#include <sstream>
#include <vector>
@@ -30,9 +32,9 @@ class NigoriStream {
// Append the big-endian representation of the length of |value| with 32 bits,
// followed by |value| itself to the stream.
NigoriStream& operator<<(const std::string& value) {
- uint32 size = base::HostToNet32(value.size());
+ uint32_t size = base::HostToNet32(value.size());
- stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32));
+ stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32_t));
stream_ << value;
return *this;
}
@@ -41,10 +43,10 @@ class NigoriStream {
// followed by the big-endian representation of the value of |type|, with 32
// bits, to the stream.
NigoriStream& operator<<(const Nigori::Type type) {
- uint32 size = base::HostToNet32(sizeof(uint32));
- stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32));
- uint32 value = base::HostToNet32(type);
- stream_.write(reinterpret_cast<char*>(&value), sizeof(uint32));
+ uint32_t size = base::HostToNet32(sizeof(uint32_t));
+ stream_.write(reinterpret_cast<char*>(&size), sizeof(uint32_t));
+ uint32_t value = base::HostToNet32(type);
+ stream_.write(reinterpret_cast<char*>(&value), sizeof(uint32_t));
return *this;
}
« no previous file with comments | « sync/util/nigori.h ('k') | sync/util/time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698