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

Unified Diff: third_party/protobuf/src/google/protobuf/util/internal/object_writer.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/util/internal/object_writer.h
diff --git a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h
index 9f07363d89e52142d2afb5e1c1de1ec4a46a8e11..b6fbd19bf7140d707913775de601c6597863ea65 100644
--- a/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h
+++ b/third_party/protobuf/src/google/protobuf/util/internal/object_writer.h
@@ -101,6 +101,7 @@ class LIBPROTOBUF_EXPORT ObjectWriter {
// Renders a Null value.
virtual ObjectWriter* RenderNull(StringPiece name) = 0;
+
// Renders a DataPiece object to a ObjectWriter.
static void RenderDataPieceTo(const DataPiece& data, StringPiece name,
ObjectWriter* ow);
@@ -118,6 +119,13 @@ class LIBPROTOBUF_EXPORT ObjectWriter {
return use_strict_base64_decoding_;
}
+ // Whether empty strings should be rendered for the next name for Start/Render
+ // calls. This setting is only valid until the next key is rendered, after
+ // which it gets reset.
+ // It is up to the derived classes to interpret this and render accordingly.
+ // Default implementation ignores this setting.
+ virtual void empty_name_ok_for_next_key() {}
+
protected:
ObjectWriter() : use_strict_base64_decoding_(true) {}

Powered by Google App Engine
This is Rietveld 408576698