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

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

Issue 11359146: Revert "Linux: change protobuf default option to allow building" (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 #!/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
282 package enterprise_management; 284 package enterprise_management;
283 285
284 message StringList { 286 message StringList {
285 repeated string entries = 1; 287 repeated string entries = 1;
286 } 288 }
287 289
288 message PolicyOptions { 290 message PolicyOptions {
289 enum PolicyMode { 291 enum PolicyMode {
290 // The given settings are applied regardless of user choice. 292 // The given settings are applied regardless of user choice.
291 MANDATORY = 0; 293 MANDATORY = 0;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if policy['type'] == 'group': 466 if policy['type'] == 'group':
465 for sub_policy in policy['policies']: 467 for sub_policy in policy['policies']:
466 _WritePolicyCode(f, sub_policy) 468 _WritePolicyCode(f, sub_policy)
467 else: 469 else:
468 _WritePolicyCode(f, policy) 470 _WritePolicyCode(f, policy)
469 f.write(CPP_FOOT) 471 f.write(CPP_FOOT)
470 472
471 473
472 if __name__ == '__main__': 474 if __name__ == '__main__':
473 sys.exit(main()) 475 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