Skip to content

Updating Chromium Manifests

AP Orlebeke edited this page Nov 21, 2020 · 2 revisions

ChromeToBrave.py

Introduced in https://github.com/ProfileCreator/ProfileManifests/pull/344, a ChromeToBrave.py script was added to this project. Since Chrome tends to be the main Chromium project that other browsers - Brave & Microsoft Edge (ATM) - are based, ChromeToBrave aims to take the current state of the Chrome manifest and turn it into a manifest for Brave. This greatly speeds up & simplifies the process of updating these manifests when changes are made.

The script lives in Resources/ChromeToBrave

Assumptions

The assumption at the moment is that any preference in the Chrome manifest is shared with Brave.

However, Brave does have a number of its own preferences that are not shared with the larger Chromium project. These Brave-specific preferences are listed in the same resources folder as the script in com.brave.Browser-specific.plist.

The .plist is formatted in the following way:

  • A top level array key defines the category / tab that the Brave-specific key lives in (ex. Misc.).
    • This organizes the Brave preferences in the correct location in the manifest
  • Dictionaries within the top level array key define the settings for each Brave-specific preference.
  • Keys & values within each dictionary mirror the formatting of any other preference.

If a preference is included in the com.brave.Browser-specific.plist which also exists in the Chrome manifest, it will be duplicated and not overwritten.

Using ChromeToBrave.py

  1. After changes have been made to the Chrome manifest, open a Terminal and simply invoke ChromeToBrave.py script.
  2. Verify the changes you've made in the Chrome manifest are mirrored in the Brave manifest.
  3. Commit the Brave changes as part of your Chrome manifest changes.

ChromeToEdge.py

Work in progress...

Edge is a different beast compared to Brave, as Microsoft has many preference keys which are shared with Chrome, but are named differently. For example, Chrome uses the term "Bookmarks" to define saved sites whereas Microsoft uses "Favorites".

Additionally, Microsoft has a number of unique preferences that do not exist in Chrome, as well as a number that exist in Chrome which are not present in Edge.

To Do

  • Add check for duplicate preferences such that those that existing in the -specific.plist which also exist in Chrome are overwritten by the -specific.plist. Currently this causes the preference to be duplicated.
  • Add ChromeToEdge.py