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

Unified Diff: third_party/protobuf/objectivec/Tests/unittest_deprecated_file.proto

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/objectivec/Tests/unittest_deprecated_file.proto
diff --git a/third_party/protobuf/js/test2.proto b/third_party/protobuf/objectivec/Tests/unittest_deprecated_file.proto
similarity index 56%
copy from third_party/protobuf/js/test2.proto
copy to third_party/protobuf/objectivec/Tests/unittest_deprecated_file.proto
index 44e55effcb47e983729f41a0b95f3e0f20497c05..ef92e7de1a01cf6c8550a5048510562cb0469054 100644
--- a/third_party/protobuf/js/test2.proto
+++ b/third_party/protobuf/objectivec/Tests/unittest_deprecated_file.proto
@@ -1,6 +1,5 @@
// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+// Copyright 2016 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -30,25 +29,48 @@
syntax = "proto2";
-option java_package = "com.google.apps.jspb.proto";
-option java_multiple_files = true;
+package protobuf_deprecated_file;
+option objc_class_prefix = "FileDep";
-package jspb.test;
+//
+// This file is like unittest_deprecated.proto, but does NOT use message, enum,
+// enum value, or field level deprecation; instead it uses the file level option
+// to mark everything.
+//
+// The source generated from this file needs to be inspect to confirm it has
+// all of the expected annotations. It also will be compiled into the unittest
+// and that compile should be clean without errors.
+//
+option deprecated = true;
-message TestExtensionsMessage {
- optional int32 intfield = 1;
+// Message to catch the deprecation.
+message Msg1 {
extensions 100 to max;
+
+ optional string string_field = 1;
+}
+
+// Mix of extension field types to catch the deprecation.
+extend Msg1 {
+ optional string string_ext_field = 101;
+ optional int32 int_ext_field = 102;
+ repeated fixed32 fixed_ext_field = 103;
+ optional Msg1 msg_ext_field = 104;
}
-message ExtensionMessage {
- extend TestExtensionsMessage {
- optional ExtensionMessage ext_field = 100;
+// Mix of extension field types (scoped to a message) to catch the deprecation.
+message Msg1A {
+ extend Msg1 {
+ optional string string_ext2_field = 201;
+ optional int32 int_ext2_field = 202;
+ repeated fixed32 fixed_ext2_field = 203;
+ optional Msg1 msg_ext2_field = 204;
}
- optional string ext1 = 1;
}
-// Floating extensions are only supported when generating a _lib.js library.
-extend TestExtensionsMessage {
- optional ExtensionMessage floating_msg_field = 101;
- optional string floating_str_field = 102;
+// Enum to catch the deprecation.
+enum Enum1 {
+ ENUM1_ONE = 1;
+ ENUM1_TWO = 2;
+ ENUM1_THREE = 3;
}

Powered by Google App Engine
This is Rietveld 408576698