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

Side by Side Diff: chrome/tools/build/generate_policy_source.py

Issue 11228038: Linux: change protobuf default option to allow building (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''python %prog [options] platform chromium_os_flag template 6 '''python %prog [options] platform chromium_os_flag template
7 7
8 platform specifies which platform source is being generated for 8 platform specifies which platform source is being generated for
9 and can be one of (win, mac, linux) 9 and can be one of (win, mac, linux)
10 chromium_os_flag should be 1 if this is a Chromium OS build 10 chromium_os_flag should be 1 if this is a Chromium OS build
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 for policy in _GetPolicyList(template_file_contents): 272 for policy in _GetPolicyList(template_file_contents):
273 f.write('const char k{name}[] = "{name}";\n'.format(name=policy.name)) 273 f.write('const char k{name}[] = "{name}";\n'.format(name=policy.name))
274 f.write('\n} // namespace key\n\n' 274 f.write('\n} // namespace key\n\n'
275 '} // namespace policy\n') 275 '} // namespace policy\n')
276 276
277 277
278 #------------------ policy protobuf --------------------------------# 278 #------------------ policy protobuf --------------------------------#
279 PROTO_HEAD = ''' 279 PROTO_HEAD = '''
280 syntax = "proto2"; 280 syntax = "proto2";
281 281
282 option optimize_for = LITE_RUNTIME;
283
284 package enterprise_management; 282 package enterprise_management;
285 283
286 message StringList { 284 message StringList {
287 repeated string entries = 1; 285 repeated string entries = 1;
288 } 286 }
289 287
290 message PolicyOptions { 288 message PolicyOptions {
291 enum PolicyMode { 289 enum PolicyMode {
292 // The given settings are applied regardless of user choice. 290 // The given settings are applied regardless of user choice.
293 MANDATORY = 0; 291 MANDATORY = 0;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if policy['type'] == 'group': 464 if policy['type'] == 'group':
467 for sub_policy in policy['policies']: 465 for sub_policy in policy['policies']:
468 _WritePolicyCode(f, sub_policy) 466 _WritePolicyCode(f, sub_policy)
469 else: 467 else:
470 _WritePolicyCode(f, policy) 468 _WritePolicyCode(f, policy)
471 f.write(CPP_FOOT) 469 f.write(CPP_FOOT)
472 470
473 471
474 if __name__ == '__main__': 472 if __name__ == '__main__':
475 sys.exit(main()) 473 sys.exit(main())
OLDNEW
« no previous file with comments | « chrome/common/safe_browsing/csd.proto ('k') | content/browser/speech/proto/google_streaming_api.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698