OLD | NEW |
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 | 6 |
7 def GetConfigurationForBuild(defines): | 7 def GetConfigurationForBuild(defines): |
8 '''Returns a configuration dictionary for the given build that contains | 8 '''Returns a configuration dictionary for the given build that contains |
9 build-specific settings and information. | 9 build-specific settings and information. |
10 | 10 |
11 Args: | 11 Args: |
12 defines: Definitions coming from the build system. | 12 defines: Definitions coming from the build system. |
13 | 13 |
14 Raises: | 14 Raises: |
15 Exception: If 'defines' contains an unknown build-type. | 15 Exception: If 'defines' contains an unknown build-type. |
16 ''' | 16 ''' |
17 # The prefix of key names in config determines which writer will use their | 17 # The prefix of key names in config determines which writer will use their |
18 # corresponding values: | 18 # corresponding values: |
19 # win: Both ADM and ADMX. | 19 # win: Both ADM and ADMX. |
20 # mac: Only plist. | 20 # mac: Only plist. |
21 # admx: Only ADMX. | 21 # admx: Only ADMX. |
22 # none/other: Used by all the writers. | 22 # none/other: Used by all the writers. |
23 if '_chromium' in defines: | 23 if '_chromium' in defines: |
24 config = { | 24 config = { |
25 'build': 'chromium', | 25 'build': 'chromium', |
26 'app_name': 'Chromium', | 26 'app_name': 'Chromium', |
27 'frame_name': 'Chromium Frame', | 27 'frame_name': 'Chromium Frame', |
28 'os_name': 'Chromium OS', | 28 'os_name': 'Chromium OS', |
| 29 'webview_name': 'Chromium WebView', |
29 'win_reg_mandatory_key_name': 'Software\\Policies\\Chromium', | 30 'win_reg_mandatory_key_name': 'Software\\Policies\\Chromium', |
30 'win_reg_recommended_key_name': | 31 'win_reg_recommended_key_name': |
31 'Software\\Policies\\Chromium\\Recommended', | 32 'Software\\Policies\\Chromium\\Recommended', |
32 'win_mandatory_category_path': ['chromium'], | 33 'win_mandatory_category_path': ['chromium'], |
33 'win_recommended_category_path': ['chromium_recommended'], | 34 'win_recommended_category_path': ['chromium_recommended'], |
34 'admx_namespace': 'Chromium.Policies.Chromium', | 35 'admx_namespace': 'Chromium.Policies.Chromium', |
35 'admx_prefix': 'chromium', | 36 'admx_prefix': 'chromium', |
36 'linux_policy_path': '/etc/chromium/policies/', | 37 'linux_policy_path': '/etc/chromium/policies/', |
37 } | 38 } |
38 elif '_google_chrome' in defines: | 39 elif '_google_chrome' in defines: |
39 config = { | 40 config = { |
40 'build': 'chrome', | 41 'build': 'chrome', |
41 'app_name': 'Google Chrome', | 42 'app_name': 'Google Chrome', |
42 'frame_name': 'Google Chrome Frame', | 43 'frame_name': 'Google Chrome Frame', |
43 'os_name': 'Google Chrome OS', | 44 'os_name': 'Google Chrome OS', |
| 45 'webview_name': 'Android System WebView', |
44 'win_reg_mandatory_key_name': 'Software\\Policies\\Google\\Chrome', | 46 'win_reg_mandatory_key_name': 'Software\\Policies\\Google\\Chrome', |
45 'win_reg_recommended_key_name': | 47 'win_reg_recommended_key_name': |
46 'Software\\Policies\\Google\\Chrome\\Recommended', | 48 'Software\\Policies\\Google\\Chrome\\Recommended', |
47 'win_mandatory_category_path': ['google', 'googlechrome'], | 49 'win_mandatory_category_path': ['google', 'googlechrome'], |
48 'win_recommended_category_path': ['google', 'googlechrome_recommended'], | 50 'win_recommended_category_path': ['google', 'googlechrome_recommended'], |
49 'admx_namespace': 'Google.Policies.Chrome', | 51 'admx_namespace': 'Google.Policies.Chrome', |
50 'admx_prefix': 'chrome', | 52 'admx_prefix': 'chrome', |
51 'linux_policy_path': '/etc/opt/chrome/policies/', | 53 'linux_policy_path': '/etc/opt/chrome/policies/', |
52 } | 54 } |
53 else: | 55 else: |
54 raise Exception('Unknown build') | 56 raise Exception('Unknown build') |
55 if 'version' in defines: | 57 if 'version' in defines: |
56 config['version'] = defines['version'] | 58 config['version'] = defines['version'] |
57 config['win_group_policy_class'] = 'Both' | 59 config['win_group_policy_class'] = 'Both' |
58 config['win_supported_os'] = 'SUPPORTED_WINXPSP2' | 60 config['win_supported_os'] = 'SUPPORTED_WINXPSP2' |
59 if 'mac_bundle_id' in defines: | 61 if 'mac_bundle_id' in defines: |
60 config['mac_bundle_id'] = defines['mac_bundle_id'] | 62 config['mac_bundle_id'] = defines['mac_bundle_id'] |
| 63 config['android_webview_restriction_prefix'] = 'com.android.browser:' |
61 return config | 64 return config |
OLD | NEW |