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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 " $classname$OrBuilder {\n", 99 " $classname$OrBuilder {\n",
100 "classname", name_resolver_->GetImmutableClassName(descriptor_), 100 "classname", name_resolver_->GetImmutableClassName(descriptor_),
101 "extra_interfaces", ExtraBuilderInterfaces(descriptor_), 101 "extra_interfaces", ExtraBuilderInterfaces(descriptor_),
102 "extendible", 102 "extendible",
103 descriptor_->extension_range_count() > 0 ? "Extendable" : ""); 103 descriptor_->extension_range_count() > 0 ? "Extendable" : "");
104 printer->Indent(); 104 printer->Indent();
105 105
106 GenerateCommonBuilderMethods(printer); 106 GenerateCommonBuilderMethods(printer);
107 107
108 // oneof 108 // oneof
109 map<string, string> vars; 109 std::map<string, string> vars;
110 for (int i = 0; i < descriptor_->oneof_decl_count(); i++) { 110 for (int i = 0; i < descriptor_->oneof_decl_count(); i++) {
111 vars["oneof_name"] = context_->GetOneofGeneratorInfo( 111 vars["oneof_name"] = context_->GetOneofGeneratorInfo(
112 descriptor_->oneof_decl(i))->name; 112 descriptor_->oneof_decl(i))->name;
113 vars["oneof_capitalized_name"] = context_->GetOneofGeneratorInfo( 113 vars["oneof_capitalized_name"] = context_->GetOneofGeneratorInfo(
114 descriptor_->oneof_decl(i))->capitalized_name; 114 descriptor_->oneof_decl(i))->capitalized_name;
115 vars["oneof_index"] = SimpleItoa(descriptor_->oneof_decl(i)->index()); 115 vars["oneof_index"] = SimpleItoa(descriptor_->oneof_decl(i)->index());
116 116
117 // oneofCase() and clearOneof() 117 // oneofCase() and clearOneof()
118 printer->Print(vars, 118 printer->Print(vars,
119 "public $oneof_capitalized_name$Case\n" 119 "public $oneof_capitalized_name$Case\n"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 "\n", 170 "\n",
171 "classname", name_resolver_->GetImmutableClassName(descriptor_)); 171 "classname", name_resolver_->GetImmutableClassName(descriptor_));
172 } 172 }
173 173
174 // =================================================================== 174 // ===================================================================
175 175
176 } // namespace java 176 } // namespace java
177 } // namespace compiler 177 } // namespace compiler
178 } // namespace protobuf 178 } // namespace protobuf
179 } // namespace google 179 } // namespace google
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698