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

Side by Side Diff: third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved. 2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 struct Options cli_options; 76 struct Options cli_options;
77 77
78 for (int i = 0; i < options.size(); i++) { 78 for (int i = 0; i < options.size(); i++) {
79 if (options[i].first == "file_extension") { 79 if (options[i].first == "file_extension") {
80 cli_options.file_extension = options[i].second; 80 cli_options.file_extension = options[i].second;
81 } else if (options[i].first == "base_namespace") { 81 } else if (options[i].first == "base_namespace") {
82 cli_options.base_namespace = options[i].second; 82 cli_options.base_namespace = options[i].second;
83 cli_options.base_namespace_specified = true; 83 cli_options.base_namespace_specified = true;
84 } else if (options[i].first == "internal_access") { 84 } else if (options[i].first == "internal_access") {
85 cli_options.internal_access = true; 85 cli_options.internal_access = true;
86 } else if (options[i].first == "legacy_enum_values") {
87 // TODO: Remove this before final release
88 cli_options.legacy_enum_values = true;
89 } else { 86 } else {
90 *error = "Unknown generator option: " + options[i].first; 87 *error = "Unknown generator option: " + options[i].first;
91 return false; 88 return false;
92 } 89 }
93 } 90 }
94 91
95 string filename_error = ""; 92 string filename_error = "";
96 std::string filename = GetOutputFile(file, 93 std::string filename = GetOutputFile(file,
97 cli_options.file_extension, 94 cli_options.file_extension,
98 cli_options.base_namespace_specified, 95 cli_options.base_namespace_specified,
(...skipping 10 matching lines...) Expand all
109 106
110 GenerateFile(file, &printer, &cli_options); 107 GenerateFile(file, &printer, &cli_options);
111 108
112 return true; 109 return true;
113 } 110 }
114 111
115 } // namespace csharp 112 } // namespace csharp
116 } // namespace compiler 113 } // namespace compiler
117 } // namespace protobuf 114 } // namespace protobuf
118 } // namespace google 115 } // namespace google
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698