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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months 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/compiler/csharp/csharp_source_generator_base.cc
diff --git a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
similarity index 63%
copy from third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc
copy to third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
index dad6ff14468d031f16baafb2f1ca567961251c43..735d164a48f3157513c5f92f4f10cf5dc772ca67 100644
--- a/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
+// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,21 +28,39 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Author: kenton@google.com (Kenton Varda)
-// Based on original Protocol Buffers design by
-// Sanjay Ghemawat, Jeff Dean, and others.
+#include <sstream>
+#include <google/protobuf/compiler/code_generator.h>
+#include <google/protobuf/compiler/plugin.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/descriptor.pb.h>
+#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
+#include <google/protobuf/compiler/csharp/csharp_source_generator_base.h>
+#include <google/protobuf/compiler/csharp/csharp_helpers.h>
namespace google {
namespace protobuf {
-namespace io {
+namespace compiler {
+namespace csharp {
-ZeroCopyInputStream::~ZeroCopyInputStream() {}
-ZeroCopyOutputStream::~ZeroCopyOutputStream() {}
+SourceGeneratorBase::SourceGeneratorBase(const FileDescriptor* descriptor)
+ : descriptor_(descriptor) {
+}
+SourceGeneratorBase::~SourceGeneratorBase() {
+}
-} // namespace io
+void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) {
+ // This hook can be used to reintroduce generated code attributes in the future.
+}
+
+std::string SourceGeneratorBase::class_access_level() {
+ return IsDescriptorProto(descriptor_) ? "internal" : "public"; // public_classes is always on.
+}
+
+} // namespace csharp
+} // namespace compiler
} // namespace protobuf
} // namespace google

Powered by Google App Engine
This is Rietveld 408576698