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

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

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 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_enum_lite.h
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
similarity index 79%
copy from third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h
copy to third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
index 9a9e5742ac3b8590e2e2c00de5123e681a53494e..ee2f5f7a88c79b37a11ddaf0738c2d0200725804 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h
+++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
+// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -32,8 +32,8 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
-#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__
+#define GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__
#include <string>
#include <vector>
@@ -41,6 +41,12 @@
namespace google {
namespace protobuf {
+ namespace compiler {
+ namespace java {
+ class Context; // context.h
+ class ClassNameResolver; // name_resolver.h
+ }
+ }
namespace io {
class Printer; // printer.h
}
@@ -50,10 +56,12 @@ namespace protobuf {
namespace compiler {
namespace java {
-class EnumGenerator {
+class EnumLiteGenerator {
public:
- explicit EnumGenerator(const EnumDescriptor* descriptor);
- ~EnumGenerator();
+ explicit EnumLiteGenerator(const EnumDescriptor* descriptor,
+ bool immutable_api,
+ Context* context);
+ ~EnumLiteGenerator();
void Generate(io::Printer* printer);
@@ -73,9 +81,14 @@ class EnumGenerator {
};
vector<Alias> aliases_;
+ bool immutable_api_;
+
+ Context* context_;
+ ClassNameResolver* name_resolver_;
+
bool CanUseEnumValues();
- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator);
+ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumLiteGenerator);
};
} // namespace java
@@ -83,4 +96,4 @@ class EnumGenerator {
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_H__
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_ENUM_LITE_H__

Powered by Google App Engine
This is Rietveld 408576698