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

Unified Diff: third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto

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/java/src/test/java/com/google/protobuf/multiple_files_test.proto
diff --git a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto b/third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto
similarity index 62%
copy from third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
copy to third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto
index feecbef8d4a90961b35be988402e49e74fed313c..92790506f022cbdc16f53b27442b17d5be26eae3 100644
--- a/third_party/protobuf/src/google/protobuf/unittest_optimize_for.proto
+++ b/third_party/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto
@@ -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
@@ -29,33 +29,50 @@
// 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.
//
-// A proto file which uses optimize_for = CODE_SIZE.
+// A proto file which tests the java_multiple_files option.
+
+syntax = "proto2";
+
+// Some generic_services option(s) added automatically.
+// See: http://go/proto2-generic-services-default
+option java_generic_services = true; // auto-added
import "google/protobuf/unittest.proto";
+import "google/protobuf/descriptor.proto";
package protobuf_unittest;
-option optimize_for = CODE_SIZE;
-
-message TestOptimizedForSize {
- optional int32 i = 1;
- optional ForeignMessage msg = 19;
+option java_multiple_files = true;
+option java_outer_classname = "MultipleFilesTestProto";
- extensions 1000 to max;
- extend TestOptimizedForSize {
- optional int32 test_extension = 1234;
- optional TestRequiredOptimizedForSize test_extension2 = 1235;
+message MessageWithNoOuter {
+ message NestedMessage {
+ optional int32 i = 1;
}
+ enum NestedEnum {
+ BAZ = 3;
+ }
+ optional NestedMessage nested = 1;
+ repeated TestAllTypes foreign = 2;
+ optional NestedEnum nested_enum = 3;
+ optional EnumWithNoOuter foreign_enum = 4;
}
-message TestRequiredOptimizedForSize {
- required int32 x = 1;
+extend google.protobuf.EnumValueOptions {
+ optional int32 enum_value_option = 7654321;
}
-
-message TestOptionalOptimizedForSize {
- optional TestRequiredOptimizedForSize o = 1;
+
+enum EnumWithNoOuter {
+ FOO = 1 [(enum_value_option) = 12345];
+ BAR = 2;
+}
+
+service ServiceWithNoOuter {
+ rpc Foo(MessageWithNoOuter) returns(TestAllTypes);
+}
+
+extend TestAllExtensions {
+ optional int32 extension_with_outer = 1234567;
}

Powered by Google App Engine
This is Rietveld 408576698