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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 void FieldGeneratorBase::GenerateCodecCode(io::Printer* printer) { 119 void FieldGeneratorBase::GenerateCodecCode(io::Printer* printer) {
120 // No-op: expect this to be overridden by appropriate types. 120 // No-op: expect this to be overridden by appropriate types.
121 // Could fail if we get called here though... 121 // Could fail if we get called here though...
122 } 122 }
123 123
124 void FieldGeneratorBase::AddDeprecatedFlag(io::Printer* printer) { 124 void FieldGeneratorBase::AddDeprecatedFlag(io::Printer* printer) {
125 if (descriptor_->options().deprecated()) 125 if (descriptor_->options().deprecated())
126 { 126 {
127 printer->Print("[global::System.ObsoleteAttribute]\n"); 127 printer->Print("[global::System.ObsoleteAttribute()]\n");
128 } 128 }
129 } 129 }
130 130
131 void FieldGeneratorBase::AddPublicMemberAttributes(io::Printer* printer) { 131 void FieldGeneratorBase::AddPublicMemberAttributes(io::Printer* printer) {
132 AddDeprecatedFlag(printer); 132 AddDeprecatedFlag(printer);
133 WriteGeneratedCodeAttributes(printer);
134 } 133 }
135 134
136 std::string FieldGeneratorBase::oneof_property_name() { 135 std::string FieldGeneratorBase::oneof_property_name() {
137 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), true); 136 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), true);
138 } 137 }
139 138
140 std::string FieldGeneratorBase::oneof_name() { 139 std::string FieldGeneratorBase::oneof_name() {
141 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), false); 140 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), false);
142 } 141 }
143 142
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 default: 420 default:
422 GOOGLE_LOG(FATAL)<< "Unknown field type."; 421 GOOGLE_LOG(FATAL)<< "Unknown field type.";
423 return ""; 422 return "";
424 } 423 }
425 } 424 }
426 425
427 } // namespace csharp 426 } // namespace csharp
428 } // namespace compiler 427 } // namespace compiler
429 } // namespace protobuf 428 } // namespace protobuf
430 } // namespace google 429 } // namespace google
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698