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

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

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 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 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 7d21fe617c870f6d1c8375d6920c716688d33e33..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
@@ -43,7 +43,7 @@ namespace compiler {
namespace java {
Context::Context(const FileDescriptor* file)
- : name_resolver_(new ClassNameResolver) {
+ : name_resolver_(new ClassNameResolver), enforce_lite_(false) {
InitializeFieldGeneratorInfo(file);
}
@@ -189,6 +189,13 @@ const OneofGeneratorInfo* Context::GetOneofGeneratorInfo(
return result;
}
+// 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;
+}
+
} // namespace java
} // namespace compiler
} // namespace protobuf

Powered by Google App Engine
This is Rietveld 408576698