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

Side by Side Diff: grit/format/policy_templates/writer_configuration.py

Issue 7994004: Initial source commit to grit-i18n project. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 3 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5
6 def GetConfigurationForBuild(defines):
7 '''Returns a configuration dictionary for the given build that contains
8 build-specific settings and information.
9
10 Args:
11 defines: Definitions coming from the build system.
12
13 Raises:
14 Exception: If 'defines' contains an unknown build-type.
15 '''
16 # The prefix of key names in config determines which writer will use their
17 # corresponding values:
18 # win: Both ADM and ADMX.
19 # mac: Only plist.
20 # admx: Only ADMX.
21 # none/other: Used by all the writers.
22 if '_chromium' in defines:
23 config = {
24 'build': 'chromium',
25 'app_name': 'Chromium',
26 'frame_name': 'Chromium Frame',
27 'os_name': 'Chromium OS',
28 'win_reg_key_name': 'Software\\Policies\\Chromium',
29 'win_category_path': ['chromium'],
30 'admx_namespace': 'Chromium.Policies.Chromium',
31 'admx_prefix': 'chromium',
32 }
33 elif '_google_chrome' in defines:
34 config = {
35 'build': 'chrome',
36 'app_name': 'Google Chrome',
37 'frame_name': 'Google Chrome Frame',
38 'os_name': 'Google Chrome OS',
39 'win_reg_key_name': 'Software\\Policies\\Google\\Chrome',
40 'win_category_path': ['google', 'googlechrome'],
41 'admx_namespace': 'Google.Policies.Chrome',
42 'admx_prefix': 'chrome',
43 }
44 else:
45 raise Exception('Unknown build')
46 config['win_group_policy_class'] = 'Both'
47 config['win_supported_os'] = 'SUPPORTED_WINXPSP2'
48 if 'mac_bundle_id' in defines:
49 config['mac_bundle_id'] = defines['mac_bundle_id']
50 return config
OLDNEW
« no previous file with comments | « grit/format/policy_templates/template_formatter.py ('k') | grit/format/policy_templates/writers/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698