Index: sync/util/nigori.cc |
diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc |
index 168d8eb5ec6e02866e331630ebe9b45de1ed9449..af694a114331a33f0252870ab42bc9aa7e88094d 100644 |
--- a/sync/util/nigori.cc |
+++ b/sync/util/nigori.cc |
@@ -30,7 +30,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; |
@@ -40,9 +40,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; |
} |