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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.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 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);
133 } 134 }
134 135
135 std::string FieldGeneratorBase::oneof_property_name() { 136 std::string FieldGeneratorBase::oneof_property_name() {
136 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), true); 137 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), true);
137 } 138 }
138 139
139 std::string FieldGeneratorBase::oneof_name() { 140 std::string FieldGeneratorBase::oneof_name() {
140 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), false); 141 return UnderscoresToCamelCase(descriptor_->containing_oneof()->name(), false);
141 } 142 }
142 143
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 default: 421 default:
421 GOOGLE_LOG(FATAL)<< "Unknown field type."; 422 GOOGLE_LOG(FATAL)<< "Unknown field type.";
422 return ""; 423 return "";
423 } 424 }
424 } 425 }
425 426
426 } // namespace csharp 427 } // namespace csharp
427 } // namespace compiler 428 } // namespace compiler
428 } // namespace protobuf 429 } // namespace protobuf
429 } // namespace google 430 } // namespace google
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698