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

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

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Update to new HEAD (b7632464b4) + restore GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER Created 4 years, 1 month 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 0a112888c0bca3623ea44f71f0f281d2a6b4e6b7..6cfa14a0129c37ee80cc2b61fc7f5ba3b34ecb65 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)
- : name_resolver_(new ClassNameResolver), enforce_lite_(false) {
+Context::Context(const FileDescriptor* file, const Options& options)
+ : name_resolver_(new ClassNameResolver), options_(options) {
InitializeFieldGeneratorInfo(file);
}
@@ -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 enforce_lite_ || descriptor->file()->options().optimize_for() !=
- FileOptions::CODE_SIZE;
+ return options_.enforce_lite ||
+ descriptor->file()->options().optimize_for() != FileOptions::CODE_SIZE;
}
} // namespace java

Powered by Google App Engine
This is Rietveld 408576698