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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc

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/compiler/objectivec/objectivec_extension.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
index 3f7ab9d39236dff2de003ddb0994bf9d98c9c479..7073173c8809df01ae98b5f9a3c9cbe7540517a2 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
@@ -63,13 +63,16 @@ void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
vars["method_name"] = method_name_;
SourceLocation location;
if (descriptor_->GetSourceLocation(&location)) {
- vars["comments"] = BuildCommentsString(location);
+ vars["comments"] = BuildCommentsString(location, true);
} else {
vars["comments"] = "";
}
+ // Unlike normal message fields, check if the file for the extension was
+ // deprecated.
+ vars["deprecated_attribute"] = GetOptionalDeprecatedAttribute(descriptor_, descriptor_->file());
printer->Print(vars,
"$comments$"
- "+ (GPBExtensionDescriptor *)$method_name$;\n");
+ "+ (GPBExtensionDescriptor *)$method_name$$deprecated_attribute$;\n");
}
void ExtensionGenerator::GenerateStaticVariablesInitialization(
@@ -85,7 +88,7 @@ void ExtensionGenerator::GenerateStaticVariablesInitialization(
if (descriptor_->containing_type()->options().message_set_wire_format())
options.push_back("GPBExtensionSetWireFormat");
- vars["options"] = BuildFlagsString(options);
+ vars["options"] = BuildFlagsString(FLAGTYPE_EXTENSION, options);
ObjectiveCType objc_type = GetObjectiveCType(descriptor_);
string singular_type;

Powered by Google App Engine
This is Rietveld 408576698