Index: base/big_endian.h |
diff --git a/net/base/big_endian.h b/base/big_endian.h |
similarity index 88% |
rename from net/base/big_endian.h |
rename to base/big_endian.h |
index 911f3c5074d5664943fd5a4c22008597f7c9dc7d..bd51ce9104c8253a46b976a2dcd3a4fcfef098d3 100644 |
--- a/net/base/big_endian.h |
+++ b/base/big_endian.h |
@@ -2,14 +2,14 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef NET_BASE_BIG_ENDIAN_H_ |
-#define NET_BASE_BIG_ENDIAN_H_ |
+#ifndef BASE_BIG_ENDIAN_H_ |
+#define BASE_BIG_ENDIAN_H_ |
+#include "base/base_export.h" |
#include "base/basictypes.h" |
#include "base/strings/string_piece.h" |
-#include "net/base/net_export.h" |
-namespace net { |
+namespace base { |
// Read an integer (signed or unsigned) from |buf| in Big Endian order. |
// Note: this loop is unrolled with -O1 and above. |
@@ -49,9 +49,9 @@ inline void WriteBigEndian<uint8>(char buf[], uint8 val) { |
// Allows reading integers in network order (big endian) while iterating over |
// an underlying buffer. All the reading functions advance the internal pointer. |
-class NET_EXPORT BigEndianReader { |
+class BASE_EXPORT BigEndianReader { |
public: |
- BigEndianReader(const void* buf, size_t len); |
+ BigEndianReader(const char* buf, size_t len); |
const char* ptr() const { return ptr_; } |
int remaining() const { return end_ - ptr_; } |
@@ -75,9 +75,9 @@ class NET_EXPORT BigEndianReader { |
// Allows writing integers in network order (big endian) while iterating over |
// an underlying buffer. All the writing functions advance the internal pointer. |
-class NET_EXPORT BigEndianWriter { |
+class BASE_EXPORT BigEndianWriter { |
public: |
- BigEndianWriter(void* buf, size_t len); |
+ BigEndianWriter(char* buf, size_t len); |
char* ptr() const { return ptr_; } |
int remaining() const { return end_ - ptr_; } |
@@ -97,7 +97,6 @@ class NET_EXPORT BigEndianWriter { |
char* end_; |
}; |
-} // namespace net |
- |
-#endif // NET_BASE_BIG_ENDIAN_H_ |
+} // namespace base |
+#endif // BASE_BIG_ENDIAN_H_ |