Chromium change: https://github.com/chromium/chromium/commit/727acdb62db2d878f9a4675677c297c00ec79b51 Reland "Stop generating unsupported policies on android" Reason for reland: Fix issue from crbug.com/1344410 Original change's description: > Stop generating unsupported policies on android > > This CL also enables the MaxConnectionsPerProxy policy on Chrome OS. > > Bug: 223616 > Change-Id: I8205d38d11b427630bbfedf4e83d50d089bbe8b0 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3751298 > Reviewed-by: Alex Ilin <alexilin@chromium.org> > Commit-Queue: Yann Dago <ydago@chromium.org> > Reviewed-by: Owen Min <zmin@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1023956} Bug: 223616, 1344410
66 lines
2.2 KiB
Python
66 lines
2.2 KiB
Python
#!/usr/bin/env python
|
|
|
|
# Copyright (c) 2019 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
CHROMIUM_POLICY_KEY = 'SOFTWARE\\\\Policies\\\\BraveSoftware\\\\Brave'
|
|
|
|
|
|
def AddBravePolicies(template_file_contents):
|
|
highest_id = template_file_contents['highest_id_currently_used']
|
|
policies = [
|
|
{
|
|
'name': 'TorDisabled',
|
|
'type': 'main',
|
|
'schema': {'type': 'boolean'},
|
|
'supported_on': ['chrome.win:78-',
|
|
'chrome.mac:93-',
|
|
'chrome.linux:93-'],
|
|
'features': {
|
|
'dynamic_refresh': False,
|
|
'per_profile': False,
|
|
'can_be_recommended': False,
|
|
'can_be_mandatory': True
|
|
},
|
|
'example_value': True,
|
|
'id': 0,
|
|
'caption': '''Disables the tor feature.''',
|
|
'tags': [],
|
|
'desc': ('''This policy allows an admin to specify that tor '''
|
|
'''must be disabled at startup.'''),
|
|
},
|
|
{
|
|
'name': 'IPFSEnabled',
|
|
'type': 'main',
|
|
'schema': {'type': 'boolean'},
|
|
'supported_on': ['chrome.*:87-'],
|
|
'future_on': ['android'],
|
|
'features': {
|
|
'dynamic_refresh': False,
|
|
'per_profile': True,
|
|
'can_be_recommended': False,
|
|
'can_be_mandatory': True
|
|
},
|
|
'example_value': True,
|
|
'id': 1,
|
|
'caption': '''Enable IPFS feature''',
|
|
'tags': [],
|
|
'desc': ('''This policy allows an admin to specify whether IPFS '''
|
|
'''feature can be enabled.'''),
|
|
}
|
|
]
|
|
|
|
# Our new polices are added with highest id
|
|
next_id = highest_id
|
|
for policy in policies:
|
|
next_id += 1
|
|
policy['id'] = next_id
|
|
template_file_contents['policy_definitions'].append(policy)
|
|
|
|
# Update highest id
|
|
template_file_contents['highest_id_currently_used'] = highest_id + \
|
|
len(policies)
|