Index: third_party/protobuf/src/google/protobuf/wire_format_lite.h |
=================================================================== |
--- third_party/protobuf/src/google/protobuf/wire_format_lite.h (revision 216642) |
+++ third_party/protobuf/src/google/protobuf/wire_format_lite.h (working copy) |
@@ -41,16 +41,14 @@ |
#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_H__ |
#include <string> |
+#include <google/protobuf/stubs/common.h> |
#include <google/protobuf/message_lite.h> |
+#include <google/protobuf/io/coded_stream.h> // for CodedOutputStream::Varint32Size |
namespace google { |
namespace protobuf { |
template <typename T> class RepeatedField; // repeated_field.h |
- namespace io { |
- class CodedInputStream; // coded_stream.h |
- class CodedOutputStream; // coded_stream.h |
- } |
class UnknownFieldSet; |
} |
@@ -521,6 +519,10 @@ |
template<typename MessageType> |
static inline int MessageSizeNoVirtual(const MessageType& value); |
+ // Given the length of data, calculate the byte size of the data on the |
+ // wire if we encode the data as a length delimited field. |
+ static inline int LengthDelimitedSize(int length); |
+ |
private: |
// A helper method for the repeated primitive reader. This method has |
// optimizations for primitive types that have fixed size on the wire, and |
@@ -556,7 +558,7 @@ |
// saves it as an unknown varint. |
void SkipUnknownEnum(int field_number, int value); |
- private: |
+ protected: |
UnknownFieldSet* unknown_fields_; |
}; |