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

Unified Diff: third_party/protobuf/src/google/protobuf/text_format.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 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
Index: third_party/protobuf/src/google/protobuf/text_format.h
diff --git a/third_party/protobuf/src/google/protobuf/text_format.h b/third_party/protobuf/src/google/protobuf/text_format.h
index ef3d4a8fd7905ce79c806dc6dfb751ebdeb25fe4..2873d3392b6efe99cbe0e7694306c23e9bc82afb 100644
--- a/third_party/protobuf/src/google/protobuf/text_format.h
+++ b/third_party/protobuf/src/google/protobuf/text_format.h
@@ -75,6 +75,8 @@ class LIBPROTOBUF_EXPORT TextFormat {
io::ZeroCopyOutputStream* output);
// Like Print(), but outputs directly to a string.
+ // Note: output will be cleared before prior to printing, and will
+ // be left empty even if printing fails.
static bool PrintToString(const Message& message, string* output);
// Like PrintUnknownFields(), but outputs directly to a string.
@@ -301,8 +303,8 @@ class LIBPROTOBUF_EXPORT TextFormat {
int64 truncate_string_field_longer_than_;
google::protobuf::scoped_ptr<const FieldValuePrinter> default_field_value_printer_;
- typedef map<const FieldDescriptor*,
- const FieldValuePrinter*> CustomPrinterMap;
+ typedef std::map<const FieldDescriptor*,
+ const FieldValuePrinter*> CustomPrinterMap;
CustomPrinterMap custom_printers_;
};
@@ -391,11 +393,13 @@ class LIBPROTOBUF_EXPORT TextFormat {
ParseInfoTree* CreateNested(const FieldDescriptor* field);
// Defines the map from the index-th field descriptor to its parse location.
- typedef map<const FieldDescriptor*, vector<ParseLocation> > LocationMap;
+ typedef std::map<const FieldDescriptor*,
+ std::vector<ParseLocation> > LocationMap;
// Defines the map from the index-th field descriptor to the nested parse
// info tree.
- typedef map<const FieldDescriptor*, vector<ParseInfoTree*> > NestedMap;
+ typedef std::map<const FieldDescriptor*,
+ std::vector<ParseInfoTree*> > NestedMap;
LocationMap locations_;
NestedMap nested_;

Powered by Google App Engine
This is Rietveld 408576698