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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: 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/java/java_context.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
index b82fb3dd42329fb20167e197f75dbffba788c10e..0a112888c0bca3623ea44f71f0f281d2a6b4e6b7 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
@@ -42,8 +42,8 @@ namespace protobuf {
namespace compiler {
namespace java {
-Context::Context(const FileDescriptor* file, const Options& options)
- : name_resolver_(new ClassNameResolver), options_(options) {
+Context::Context(const FileDescriptor* file)
+ : name_resolver_(new ClassNameResolver), enforce_lite_(false) {
InitializeFieldGeneratorInfo(file);
}
@@ -108,7 +108,7 @@ void Context::InitializeFieldGeneratorInfoForMessage(
for (int i = 0; i < message->nested_type_count(); ++i) {
InitializeFieldGeneratorInfoForMessage(message->nested_type(i));
}
- std::vector<const FieldDescriptor*> fields;
+ vector<const FieldDescriptor*> fields;
for (int i = 0; i < message->field_count(); ++i) {
fields.push_back(message->field(i));
}
@@ -124,11 +124,11 @@ void Context::InitializeFieldGeneratorInfoForMessage(
}
void Context::InitializeFieldGeneratorInfoForFields(
- const std::vector<const FieldDescriptor*>& fields) {
+ const vector<const FieldDescriptor*>& fields) {
// Find out all fields that conflict with some other field in the same
// message.
- std::vector<bool> is_conflict(fields.size());
- std::vector<string> conflict_reason(fields.size());
+ vector<bool> is_conflict(fields.size());
+ vector<string> conflict_reason(fields.size());
for (int i = 0; i < fields.size(); ++i) {
const FieldDescriptor* field = fields[i];
const string& name = UnderscoresToCapitalizedCamelCase(field);
@@ -192,8 +192,8 @@ const OneofGeneratorInfo* Context::GetOneofGeneratorInfo(
// Does this message class have generated parsing, serialization, and other
// standard methods for which reflection-based fallback implementations exist?
bool Context::HasGeneratedMethods(const Descriptor* descriptor) const {
- return options_.enforce_lite ||
- descriptor->file()->options().optimize_for() != FileOptions::CODE_SIZE;
+ return enforce_lite_ || descriptor->file()->options().optimize_for() !=
+ FileOptions::CODE_SIZE;
}
} // namespace java

Powered by Google App Engine
This is Rietveld 408576698