summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
Diffstat (limited to 'sync')
-rw-r--r--sync/util/nigori.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc
index 1b0e3c1..0b96b37 100644
--- a/sync/util/nigori.cc
+++ b/sync/util/nigori.cc
@@ -31,7 +31,7 @@ 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 = htonl(value.size());
+ uint32 size = base::HostToNet32(value.size());
stream_.write((char *) &size, sizeof(uint32));
stream_ << value;
return *this;
@@ -41,9 +41,9 @@ 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 = htonl(sizeof(uint32));
+ uint32 size = base::HostToNet32(sizeof(uint32));
stream_.write((char *) &size, sizeof(uint32));
- uint32 value = htonl(type);
+ uint32 value = base::HostToNet32(type);
stream_.write((char *) &value, sizeof(uint32));
return *this;
}