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

Unified Diff: chrome/tools/build/generate_policy_source.py

Issue 6840014: Support decoding GenericNamedValue based policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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: chrome/tools/build/generate_policy_source.py
diff --git a/chrome/tools/build/generate_policy_source.py b/chrome/tools/build/generate_policy_source.py
index 4de4fefbf2553c8dac0e290d2d9a0b12d6651d85..42676a976ae6a42da66721d194a56db48084c7ab 100644
--- a/chrome/tools/build/generate_policy_source.py
+++ b/chrome/tools/build/generate_policy_source.py
@@ -150,6 +150,10 @@ def _WritePolicyTypeEnumerationHeader(template_file_contents, args, opts):
PROTO_HEAD = '''
syntax = "proto2";
+// TODO(jkummerow): Remove this when it's no longer needed (see comment
+// inside the imported file).
+import "old_generic_format.proto";
+
option optimize_for = LITE_RUNTIME;
package enterprise_management;
@@ -212,6 +216,12 @@ def _WriteProtobuf(template_file_contents, args, outfilepath):
f.write('// --------------------------------------------------\n'
'// Big wrapper PB containing the above groups.\n\n'
'message CloudPolicySettings {\n')
+
+ # TODO(jkummerow): Remove this when old_generic_format.proto is no longer
+ # imported.
+ f.write(
+ ' repeated enterprise_management.GenericNamedValue named_value = 2;')
+
f.write(''.join(fields))
f.write('}\n\n')

Powered by Google App Engine
This is Rietveld 408576698