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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.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/javanano/javanano_file.h
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h
similarity index 82%
copy from third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
copy to third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h
index 59911462668d56811f2bcc762a5556431c36b32e..217eafe2a88e6fd5125934602471839147da2d05 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_file.h
+++ b/third_party/protobuf/src/google/protobuf/compiler/javanano/javanano_file.h
@@ -32,12 +32,13 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__
-#define GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__
+#ifndef GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__
+#define GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__
#include <string>
#include <vector>
#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/compiler/javanano/javanano_params.h>
namespace google {
namespace protobuf {
@@ -52,11 +53,11 @@ namespace protobuf {
namespace protobuf {
namespace compiler {
-namespace java {
+namespace javanano {
class FileGenerator {
public:
- explicit FileGenerator(const FileDescriptor* file);
+ explicit FileGenerator(const FileDescriptor* file, const Params& params);
~FileGenerator();
// Checks for problems that would otherwise lead to cryptic compile errors.
@@ -70,32 +71,24 @@ class FileGenerator {
// files other than the outer file (i.e. one for each message, enum, and
// service type).
void GenerateSiblings(const string& package_dir,
- GeneratorContext* generator_context,
+ GeneratorContext* output_directory,
vector<string>* file_list);
const string& java_package() { return java_package_; }
const string& classname() { return classname_; }
-
private:
- // Returns whether the dependency should be included in the output file.
- // Always returns true for opensource, but used internally at Google to help
- // improve compatibility with version 1 of protocol buffers.
- bool ShouldIncludeDependency(const FileDescriptor* descriptor);
-
const FileDescriptor* file_;
+ const Params& params_;
string java_package_;
string classname_;
-
- void GenerateEmbeddedDescriptor(io::Printer* printer);
-
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator);
};
-} // namespace java
+} // namespace javanano
} // namespace compiler
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_H__
+#endif // GOOGLE_PROTOBUF_COMPILER_JAVANANO_FILE_H__

Powered by Google App Engine
This is Rietveld 408576698