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

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

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.h
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h
index 5b595d07fced4d0a4786644c8d56695abbd61680..a480e45dc40cdb98067b869fddd32e8977dccef0 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h
+++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.h
@@ -46,6 +46,7 @@ namespace protobuf {
class FieldDescriptor;
class OneofDescriptor;
class Descriptor;
+ class EnumDescriptor;
namespace compiler {
namespace java {
class ClassNameResolver; // name_resolver.h
@@ -78,6 +79,20 @@ class Context {
const OneofGeneratorInfo* GetOneofGeneratorInfo(
const OneofDescriptor* oneof) const;
+ // Enforces all the files (including transitive dependencies) to use
+ // LiteRuntime.
+ void SetEnforceLite(bool enforce_lite) {
+ enforce_lite_ = enforce_lite;
+ }
+
+ bool EnforceLite() const {
+ return enforce_lite_;
+ }
+
+ // Does this message class have generated parsing, serialization, and other
+ // standard methods for which reflection-based fallback implementations exist?
+ bool HasGeneratedMethods(const Descriptor* descriptor) const;
+
private:
void InitializeFieldGeneratorInfo(const FileDescriptor* file);
void InitializeFieldGeneratorInfoForMessage(const Descriptor* message);
@@ -87,6 +102,7 @@ class Context {
google::protobuf::scoped_ptr<ClassNameResolver> name_resolver_;
map<const FieldDescriptor*, FieldGeneratorInfo> field_generator_info_map_;
map<const OneofDescriptor*, OneofGeneratorInfo> oneof_generator_info_map_;
+ bool enforce_lite_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Context);
};

Powered by Google App Engine
This is Rietveld 408576698