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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.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/csharp/csharp_enum.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc
index bdfcc2beecb8c8effdb3d0407fc824dbb9787ede..9e4da1edca3d42a443e6a68f579e5c92645ff948 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc
@@ -60,7 +60,6 @@ EnumGenerator::~EnumGenerator() {
void EnumGenerator::Generate(io::Printer* printer) {
WriteEnumDocComment(printer, descriptor_);
- WriteGeneratedCodeAttributes(printer);
printer->Print("$access_level$ enum $name$ {\n",
"access_level", class_access_level(),
"name", descriptor_->name());
@@ -69,9 +68,7 @@ void EnumGenerator::Generate(io::Printer* printer) {
for (int i = 0; i < descriptor_->value_count(); i++) {
WriteEnumValueDocComment(printer, descriptor_->value(i));
string original_name = descriptor_->value(i)->name();
- string name = options()->legacy_enum_values
- ? descriptor_->value(i)->name()
- : GetEnumValueName(descriptor_->name(), descriptor_->value(i)->name());
+ string name = GetEnumValueName(descriptor_->name(), descriptor_->value(i)->name());
// Make sure we don't get any duplicate names due to prefix removal.
while (!used_names.insert(name).second) {
// It's possible we'll end up giving this warning multiple times, but that's better than not at all.

Powered by Google App Engine
This is Rietveld 408576698