The response has been limited to 50k tokens of the smallest files in the repo. You can remove this limitation by removing the max tokens filter.
├── .github
    ├── FUNDING.yml
    ├── ISSUE_TEMPLATE
    │   ├── bug_report.yml
    │   └── feature_request.yml
    └── PULL_REQUEST_TEMPLATE.md
├── CHANGELOG.md
├── FAQ.md
├── LICENSE
├── README.md
├── banner2-direct.svg
├── build
    ├── LASTCHANGE
    ├── RELEASE
    ├── RELEASE_COMMIT
    ├── bromite.gn_args
    ├── bromite_patches_list.txt
    ├── chromium.gn_args
    ├── chromium_patches_list.txt
    ├── patches
    │   ├── AImageReader-CFI-crash-mitigations.patch
    │   ├── Add-AllowUserCertificates-flag.patch
    │   ├── Add-Alt-D-hotkey-to-focus-address-bar.patch
    │   ├── Add-DuckDuckGo-Lite-search-engine.patch
    │   ├── Add-English-only-search-engine.patch
    │   ├── Add-IsCleartextPermitted-flag.patch
    │   ├── Add-a-proxy-configuration-page.patch
    │   ├── Add-an-always-incognito-mode.patch
    │   ├── Add-bookmark-import-export-actions.patch
    │   ├── Add-custom-tab-intents-privacy-option.patch
    │   ├── Add-exit-menu-item.patch
    │   ├── Add-flag-for-omnibox-autocomplete-filtering.patch
    │   ├── Add-flag-for-save-data-header.patch
    │   ├── Add-flag-to-configure-maximum-connections-per-host.patch
    │   ├── Add-flag-to-control-video-playback-resume-feature.patch
    │   ├── Add-flag-to-disable-IPv6-probes.patch
    │   ├── Add-flag-to-disable-external-intent-requests.patch
    │   ├── Add-flag-to-disable-vibration.patch
    │   ├── Add-lifetime-options-for-permissions.patch
    │   ├── Add-menu-item-to-bookmark-all-tabs.patch
    │   ├── Add-menu-item-to-view-source.patch
    │   ├── Add-option-to-force-tablet-UI.patch
    │   ├── Add-option-to-not-persist-tabs-across-sessions.patch
    │   ├── Add-option-to-use-home-page-as-NTP.patch
    │   ├── Add-site-engagement-flag.patch
    │   ├── Add-support-for-ISupportHelpAndFeedback.patch
    │   ├── Add-support-for-writing-URIs.patch
    │   ├── Add-webGL-site-setting.patch
    │   ├── Add-webRTC-site-settings.patch
    │   ├── Allow-building-without-enable_reporting.patch
    │   ├── Allow-building-without-supervised-users.patch
    │   ├── Allow-playing-audio-in-background.patch
    │   ├── Always-use-new-tab-page-for-default-home-page.patch
    │   ├── AudioBuffer-AnalyserNode-fp-mitigations.patch
    │   ├── Automated-domain-substitution.patch
    │   ├── Battery-API-return-nothing.patch
    │   ├── Block-gateway-attacks-via-websockets.patch
    │   ├── Block-qjz9zk-or-trk-requests.patch
    │   ├── Bookmarks-select-all-menu-entry.patch
    │   ├── Bromite-auto-updater.patch
    │   ├── Bromite-package-name.patch
    │   ├── Bromite-subresource-adblocker.patch
    │   ├── Chromium-package-name.patch
    │   ├── Clamp-time-resolution-in-requestAnimationFrame.patch
    │   ├── Client-hints-overrides.patch
    │   ├── Content-settings-infrastructure.patch
    │   ├── Dictionary-suggestions-for-the-Omnibox.patch
    │   ├── Disable-AGSA-by-default.patch
    │   ├── Disable-Accessibility-service-by-default.patch
    │   ├── Disable-AsyncDNS-by-default.patch
    │   ├── Disable-DRM-media-origin-IDs-preprovisioning.patch
    │   ├── Disable-FLoC-and-privacy-sandbox.patch
    │   ├── Disable-NTP-remote-suggestions-by-default.patch
    │   ├── Disable-PrivacyGuide.patch
    │   ├── Disable-StartSurface-feature.patch
    │   ├── Disable-TLS-resumption.patch
    │   ├── Disable-UA-full-version.patch
    │   ├── Disable-add-to-home-screen-prompt.patch
    │   ├── Disable-all-predictors-code.patch
    │   ├── Disable-all-promo-dialogs.patch
    │   ├── Disable-conversion-measurement-api.patch
    │   ├── Disable-crash-reporting.patch
    │   ├── Disable-feeds-support-by-default.patch
    │   ├── Disable-fetching-of-all-field-trials.patch
    │   ├── Disable-idle-detection.patch
    │   ├── Disable-lock-icon-in-address-bar-by-default.patch
    │   ├── Disable-media-router-and-remoting-by-default.patch
    │   ├── Disable-minidump-upload-scheduling.patch
    │   ├── Disable-offline-pages-in-CCT.patch
    │   ├── Disable-omission-of-URL-elements-in-Omnibox.patch
    │   ├── Disable-plugins-enumeration.patch
    │   ├── Disable-references-to-fonts.googleapis.com.patch
    │   ├── Disable-requests-for-single-word-Omnibar-searches.patch
    │   ├── Disable-safe-browsing.patch
    │   ├── Disable-safety-check.patch
    │   ├── Disable-smart-selection-by-default.patch
    │   ├── Disable-some-signed-exchange-features.patch
    │   ├── Disable-support-for-RAR-files-inspection.patch
    │   ├── Disable-text-fragments-by-default.patch
    │   ├── Disable-the-DIAL-repeating-discovery.patch
    │   ├── Disable-third-party-origin-trials.patch
    │   ├── Disable-update-scheduler.patch
    │   ├── Disable-various-metrics.patch
    │   ├── Do-not-build-API-keys-infobar.patch
    │   ├── Do-not-compile-QR-code-sharing.patch
    │   ├── Do-not-hide-component-extensions.patch
    │   ├── Do-not-ignore-download-location-prompt-setting.patch
    │   ├── Do-not-link-with-libatomic.patch
    │   ├── Do-not-store-passwords-by-default.patch
    │   ├── DoH-improvements.patch
    │   ├── Enable-Certificate-Transparency.patch
    │   ├── Enable-ECH-by-default.patch
    │   ├── Enable-HEVC-by-default.patch
    │   ├── Enable-PermuteTLSExtensions-by-default.patch
    │   ├── Enable-SPPI-for-devices-with-enough-memory.patch
    │   ├── Enable-StrictOriginIsolation-and-SitePerProcess.patch
    │   ├── Enable-darken-websites-checkbox-in-themes.patch
    │   ├── Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
    │   ├── Enable-native-Android-autofill.patch
    │   ├── Enable-network-isolation-features.patch
    │   ├── Enable-prefetch-privacy-changes-by-default.patch
    │   ├── Enable-share-intent.patch
    │   ├── Enable-third-party-storage-partitioning.patch
    │   ├── Experimental-user-scripts-support.patch
    │   ├── Follow-only-system-dark-mode.patch
    │   ├── Guard-for-user-agent-reduction.patch
    │   ├── Hardening-against-incognito-mode-detection.patch
    │   ├── History-number-of-days-privacy-setting.patch
    │   ├── Ignore-enterprise-policies-for-secure-DNS.patch
    │   ├── Improve-plain-text-rendering-on-mobile.patch
    │   ├── Increase-number-of-autocomplete-matches-to-10.patch
    │   ├── Inject-scripts-for-AMP-tracking-ads-and-video.patch
    │   ├── Invalidate-components-public-key.patch
    │   ├── JIT-site-settings.patch
    │   ├── Keep-empty-tabs-between-sessions.patch
    │   ├── Keep-flag-to-allow-screenshots-in-Incognito-mode.patch
    │   ├── Logcat-crash-reports-UI.patch
    │   ├── Modify-default-preferences.patch
    │   ├── Move-navigation-bar-to-bottom.patch
    │   ├── Move-some-account-settings-back-to-privacy-settings.patch
    │   ├── Multiple-fingerprinting-mitigations.patch
    │   ├── Never-fetch-popular-sites.patch
    │   ├── Never-use-HTTP-probes-for-connection-detection.patch
    │   ├── Offer-builtin-autocomplete-for-chrome-flags.patch
    │   ├── OpenSearch-miscellaneous.patch
    │   ├── Override-Navigator-Language.patch
    │   ├── Partition-Blink-memory-cache.patch
    │   ├── Partition-blobs-by-top-frame-URL.patch
    │   ├── Re-introduce-kWebAuthCable.patch
    │   ├── Re-introduce-modal-dialog-flag-to-close-all-tabs.patch
    │   ├── Re-introduce-override_build_timestamp.patch
    │   ├── Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch
    │   ├── Reintroduce-override_build_timestamp.patch
    │   ├── Remove-EV-certificates.patch
    │   ├── Remove-HTTP-referrals-in-cross-origin-navigation.patch
    │   ├── Remove-SMS-integration.patch
    │   ├── Remove-binary-blob-integrations.patch
    │   ├── Remove-blocklisted-URLs-upon-bookmark-creation.patch
    │   ├── Remove-contextual-search-manager.patch
    │   ├── Remove-help-menu-item.patch
    │   ├── Remove-mremap-from-seccomp-baseline-policy.patch
    │   ├── Remove-navigator.connection-info.patch
    │   ├── Remove-preload-of-com.google.android.gms.fonts.patch
    │   ├── Remove-price-shopping-commerce-integrations.patch
    │   ├── Remove-segmentation-platform.patch
    │   ├── Remove-signin-and-sync-integrations.patch
    │   ├── Remove-voice-recognition-integration.patch
    │   ├── Remove-weblayer-dependency-on-Play-Services.patch
    │   ├── Remove-window-name-on-cross-origin-navigation.patch
    │   ├── Replace-DoH-probe-domain-with-RIPE-domain.patch
    │   ├── Restore-Search-Ready-Omnibox-flag.patch
    │   ├── Restore-Simplified-NTP-launch.patch
    │   ├── Restore-adaptive-button-in-top-toolbar-customization.patch
    │   ├── Restore-classic-new-tab-page.patch
    │   ├── Restore-offline-indicator-v2-flag.patch
    │   ├── Revert-Delete-block-external-form-redirects.patch
    │   ├── Revert-Permit-blocking-of-view-source.patch
    │   ├── Revert-flags-remove-disable-pull-to-refresh-effect.patch
    │   ├── Revert-flags-remove-num-raster-threads.patch
    │   ├── Revert-removal-of-execution-context-address-space.patch
    │   ├── Revert-the-removal-of-an-option-to-block-autoplay.patch
    │   ├── Samsung-Note-9-SDK27-crazylinker-workaround.patch
    │   ├── Show-site-settings-for-cookies-javascript-and-ads.patch
    │   ├── Site-setting-for-images.patch
    │   ├── Switch-to-fstack-protector-strong.patch
    │   ├── Timezone-customization.patch
    │   ├── Unexpire-tab-groups-flags.patch
    │   ├── Update-i18n-zh_CN-support.patch
    │   ├── Use-4-tile-rows-never-show-logo.patch
    │   ├── Use-64-bit-WebView-processes.patch
    │   ├── Use-dummy-DFM-installer.patch
    │   ├── User-agent-customization.patch
    │   ├── Welcome-screen.patch
    │   ├── autofill-miscellaneous.patch
    │   ├── build-remove-calling-untrusted-hooks.patch
    │   ├── disable-AdsBlockedInfoBar.patch
    │   ├── disable-WebView-variations-support.patch
    │   ├── disable-appending-variations-header.patch
    │   ├── disable-battery-status-updater.patch
    │   ├── dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
    │   ├── do-not-add-suffix-to-package-name.patch
    │   ├── do-not-hide-.orig-files.patch
    │   ├── enable-ftrivial-auto-var-init-zero.patch
    │   ├── exit-on-failure-of-inclusion.patch
    │   ├── first_run-deactivate-autoupdate-globally.patch
    │   ├── kill-Auth.patch
    │   ├── kill-Location-fall-back-to-system.patch
    │   ├── kill-Vision.patch
    │   ├── mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
    │   ├── net-cert-increase-default-key-length.patch
    │   ├── openH264-enable-ARM-ARM64-optimizations.patch
    │   ├── prefs-always-prompt-for-download-directory.patch
    │   ├── profile-resetter-disable-send-settings.patch
    │   ├── sharing-hub-always-use-visible-URL.patch
    │   ├── translate-disable-fetching-of-languages-from-server.patch
    │   ├── ungoogled-chromium-Disable-Gaia.patch
    │   ├── ungoogled-chromium-Disable-Network-Time-Tracker.patch
    │   ├── ungoogled-chromium-Disable-intranet-detector.patch
    │   ├── ungoogled-chromium-Disable-profile-avatar.patch
    │   ├── ungoogled-chromium-Disable-translate-integration.patch
    │   ├── ungoogled-chromium-Disable-untraceable-URLs.patch
    │   ├── ungoogled-chromium-Disable-webRTC-log-uploader.patch
    │   ├── ungoogled-chromium-no-special-hosts-domains.patch
    │   ├── updater-disable-updater-pings.patch
    │   ├── webRTC-do-not-expose-local-IP-addresses.patch
    │   └── webview-Hard-no-to-persistent-histograms.patch
    └── ruleset_converter.gn_args
└── csagan5.asc


/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 | 
3 | patreon: csagan5
4 | custom: https://www.bromite.org/#donate
5 | 


--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
 1 | name: Feature request
 2 | description: Create a Bromite feature request
 3 | body:
 4 |   - type: markdown
 5 |     attributes:
 6 |       value: |
 7 |         Welcome! Thanks for taking time to submit a feature request.
 8 |         
 9 |         If this is not a feature request about the Bromite browser, or you are looking for a place
10 |         to ask a question to the community then please use the [GitHub Discussions](https://github.com/bromite/bromite/discussions) instead.
11 |         
12 |         Make sure you have acknowledged and completed this template before submitting your issue.
13 |         
14 |         Please read it carefully: incorrect issues will be automatically closed and ignored.
15 |         
16 |         Note:
17 |           - Features unrelated to privacy will not be considered.
18 |           - Do not ask "I would like feature X which is available in browser Y."
19 | 
20 |   - type: checkboxes
21 |     id: preliminary_checklist
22 |     attributes:
23 |       label: Preliminary checklist
24 |       options:
25 |         - label: "I have read the [README](https://github.com/bromite/bromite/blob/master/README.md)"
26 |           required: true
27 |         - label: "I have read the [FAQs](https://github.com/bromite/bromite/blob/master/FAQ.md)."
28 |           required: true
29 |         - label: "I have searched [existing issues](https://github.com/bromite/bromite/issues) for my feature request. This is a new issue (NOT a duplicate) and is not related to another issue."
30 |           required: true
31 |         - label: "This is a feature request for the Bromite browser; not the website nor F-Droid nor anything else."
32 |           required: true
33 | 
34 |   - type: dropdown
35 |     id: is_privacy_related
36 |     attributes:
37 |       label: Is your feature request related to privacy?
38 |       description: Features that are not related to privacy are not considered.
39 |       multiple: false
40 |       options:
41 |         - "Yes"
42 |         - "No"
43 |     validations:
44 |       required: true
45 | 
46 |   - type: textarea
47 |     id: is_patch_available
48 |     attributes:
49 |       label: Is there a patch available for this feature somewhere?
50 |       description: If yes please provide URL and related license information.
51 |     validations:
52 |       required: true
53 | 
54 |   - type: textarea
55 |     id: solution_description
56 |     attributes:
57 |       label: Describe the solution you would like
58 |       description: A clear and concise description of what you want to happen.
59 |     validations:
60 |       required: true
61 | 
62 |   - type: textarea
63 |     id: alternatives_considered
64 |     attributes:
65 |       label: Describe alternatives you have considered
66 |       description: A clear and concise description of any alternative solutions or features you have considered.
67 |     validations:
68 |       required: true
69 | 


--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
 1 | ## Description
 2 | 
 3 | *Please explain here what feature or bugfix these changes are addressing and why they should be included*
 4 | 
 5 | ## All submissions
 6 | 
 7 | * [ ] there are no other open [Pull Requests](../../../pulls) for the same update/change
 8 | * [ ] Bromite can be built with these changes
 9 | * [ ] I have tested that the new change works as intended (AVD or physical device will do)
10 | 
11 | ### Format
12 | 
13 | * [ ] patch subject and filename match (e.g. `Subject: Alternative cache (NIK-based)` -> `Alternative-cache-NIK-based.patch`)
14 | * [ ] patch description contains explanation of changes
15 | * [ ] no unnecessary whitespace or unrelated changes
16 | 


--------------------------------------------------------------------------------
/banner2-direct.svg:
--------------------------------------------------------------------------------
 1 | <svg viewBox="0 0 1040 200" xmlns="http://www.w3.org/2000/svg">
 2 |   <style>
 3 | @namespace svg url(http://www.w3.org/2000/svg);
 4 | 
 5 | svg {
 6 |   font-family: Helvetica, Arial, sans-serif;
 7 |   text-rendering: geometricPrecision;
 8 | }
 9 | svg|a:link, svg|a:visited {
10 |   cursor: pointer;
11 | }
12 | .flag-blue {
13 |   fill: #0057b7;
14 | }
15 | .flag-yellow {
16 |   fill: #ffd700;
17 | }
18 | .message {
19 |   fill: white;
20 |   font-size: 20px;
21 | }
22 | .call {
23 |   fill: black;
24 |   font-size: 32px;
25 | }
26 | .mobile-only {
27 |   display: none;
28 | }
29 | .arrow {
30 |   font-size: 24px;
31 | }
32 | @media (max-width: 770px) {
33 |   .message {
34 |     display: none;
35 |     font-size: 29px;
36 |   }
37 |   .mobile-only {
38 |     display: inherit;
39 |   }
40 |   .call {
41 |     font-size: 36px;
42 |   }
43 | }
44 |   </style>
45 | 
46 |   <a href="https://stand-with-ukraine.pp.ua">
47 |     <rect x="0" y="0" width="100%" height="100%" class="flag-yellow"/>
48 |     <rect x="0" y="0" width="100%" height="110px" class="flag-blue"/>
49 | 
50 |     <text x="0" y="25" class="message">
51 |       <tspan x="25" dy="1.15em">Russia has invaded Ukraine and already killed tens of thousands of civilians, with many more raped or tortured.</tspan>
52 |       <tspan x="25" dy="1.35em">The death toll keeps climbing. It's a <tspan font-weight="bold">genocide</tspan>. We need your help. Let's fight back against the Russian regime.</tspan>
53 |     </text>
54 |     <text x="0" y="25" class="message mobile-only">
55 |       <tspan x="25" dy=".7em">Russia has invaded Ukraine and already killed tens of thousands of civilians,</tspan>
56 |       <tspan x="25" dy="1.2em">with many more raped or tortured. It's a <tspan font-weight="bold">genocide</tspan>. We need your help.</tspan>
57 |     </text>
58 | 
59 |     <text x="50%" y="78.5%" dominant-baseline="middle" text-anchor="middle" class="call">
60 |       Help Ukraine Now <tspan dominant-baseline="middle" class="arrow">➔</tspan>
61 |     </text>
62 |   </a>
63 | 
64 | </svg>
65 | 


--------------------------------------------------------------------------------
/build/LASTCHANGE:
--------------------------------------------------------------------------------
1 | 56775bdf8d12f9d3e1a99fcf1dde6a7417522963-


--------------------------------------------------------------------------------
/build/RELEASE:
--------------------------------------------------------------------------------
1 | 108.0.5359.156


--------------------------------------------------------------------------------
/build/RELEASE_COMMIT:
--------------------------------------------------------------------------------
1 | 1b133d62395a6ad11c65997a1c24acffb3f73d9e


--------------------------------------------------------------------------------
/build/bromite.gn_args:
--------------------------------------------------------------------------------
 1 | android_channel="stable"
 2 | blink_symbol_level=1
 3 | build_contextual_search=false
 4 | build_with_tflite_lib=false
 5 | chrome_pgo_phase=0
 6 | dcheck_always_on=false
 7 | debuggable_apks=false
 8 | dfmify_dev_ui=false
 9 | disable_android_lint=true
10 | disable_autofill_assistant_dfm=true
11 | disable_fieldtrial_testing_config=true
12 | disable_tab_ui_dfm=true
13 | enable_av1_decoder=true
14 | enable_dav1d_decoder=true
15 | enable_gvr_services=false
16 | enable_hangout_services_extension=false
17 | enable_iterator_debugging=false
18 | enable_mdns=false
19 | enable_mse_mpeg2ts_stream_parser=true
20 | enable_nacl=false
21 | enable_platform_dolby_vision=true
22 | enable_platform_hevc=true
23 | enable_remoting=false
24 | enable_reporting=false
25 | enable_vr=false
26 | exclude_unwind_tables=false
27 | ffmpeg_branding="Chrome"
28 | icu_use_data_file=true
29 | is_cfi=true
30 | is_component_build=false
31 | is_debug=false
32 | is_official_build=true
33 | proprietary_codecs=true
34 | rtc_build_examples=false
35 | safe_browsing_mode=0
36 | symbol_level=1
37 | system_webview_package_name="org.bromite.webview"
38 | target_os="android"
39 | treat_warnings_as_errors=true
40 | use_cfi_cast=true
41 | use_debug_fission=true
42 | use_errorprone_java_compiler=false
43 | use_gnome_keyring=false
44 | use_official_google_api_keys=false
45 | use_rtti=false
46 | use_stable_package_name_for_trichrome=false
47 | use_sysroot=false
48 | webview_includes_weblayer=false
49 | 


--------------------------------------------------------------------------------
/build/chromium.gn_args:
--------------------------------------------------------------------------------
 1 | android_channel="stable"
 2 | blink_symbol_level=1
 3 | build_contextual_search=false
 4 | build_with_tflite_lib=false
 5 | chrome_pgo_phase=0
 6 | dcheck_always_on=false
 7 | debuggable_apks=false
 8 | dfmify_dev_ui=false
 9 | disable_android_lint=true
10 | disable_autofill_assistant_dfm=true
11 | disable_fieldtrial_testing_config=true
12 | disable_tab_ui_dfm=true
13 | enable_av1_decoder=true
14 | enable_dav1d_decoder=true
15 | enable_gvr_services=false
16 | enable_hangout_services_extension=false
17 | enable_iterator_debugging=false
18 | enable_mdns=false
19 | enable_mse_mpeg2ts_stream_parser=true
20 | enable_nacl=false
21 | enable_platform_dolby_vision=true
22 | enable_platform_hevc=true
23 | enable_remoting=false
24 | enable_reporting=true
25 | enable_vr=false
26 | exclude_unwind_tables=false
27 | ffmpeg_branding="Chrome"
28 | icu_use_data_file=true
29 | is_cfi=true
30 | is_component_build=false
31 | is_debug=false
32 | is_official_build=true
33 | proprietary_codecs=true
34 | rtc_build_examples=false
35 | safe_browsing_mode=2
36 | symbol_level=1
37 | system_webview_package_name="com.android.webview"
38 | target_os="android"
39 | treat_warnings_as_errors=true
40 | use_cfi_cast=true
41 | use_debug_fission=true
42 | use_errorprone_java_compiler=false
43 | use_gnome_keyring=false
44 | use_official_google_api_keys=false
45 | use_rtti=false
46 | use_stable_package_name_for_trichrome=false
47 | use_sysroot=false
48 | webview_includes_weblayer=false
49 | 


--------------------------------------------------------------------------------
/build/chromium_patches_list.txt:
--------------------------------------------------------------------------------
 1 | exit-on-failure-of-inclusion.patch
 2 | Reintroduce-override_build_timestamp.patch
 3 | do-not-hide-.orig-files.patch
 4 | Do-not-link-with-libatomic.patch
 5 | do-not-add-suffix-to-package-name.patch
 6 | Switch-to-fstack-protector-strong.patch
 7 | Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
 8 | enable-ftrivial-auto-var-init-zero.patch
 9 | Disable-feeds-support-by-default.patch
10 | Chromium-package-name.patch
11 | 


--------------------------------------------------------------------------------
/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Tue, 9 Mar 2021 19:43:00 +0100
 3 | Subject: Add Alt+D hotkey to focus address bar
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../java/src/org/chromium/chrome/browser/KeyboardShortcuts.java | 2 ++
 8 |  1 file changed, 2 insertions(+)
 9 | 
10 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
11 | --- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
12 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
13 | @@ -155,6 +155,8 @@ public class KeyboardShortcuts {
14 |                  KeyEvent.KEYCODE_F, KeyEvent.META_CTRL_ON);
15 |          addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar,
16 |                  KeyEvent.KEYCODE_L, KeyEvent.META_CTRL_ON);
17 | +        addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar,
18 | +                KeyEvent.KEYCODE_D, KeyEvent.META_ALT_ON);
19 |          shortcutGroups.add(chromeFeatureShortcutGroup);
20 |  
21 |          KeyboardShortcutGroup webpageShortcutGroup = new KeyboardShortcutGroup(
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Add-flag-to-control-video-playback-resume-feature.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 25 Oct 2018 23:13:34 +0200
 3 | Subject: Add flag to control video playback resume feature
 4 | 
 5 | Disable it by default on Android as it is everywhere else
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/about_flags.cc       | 4 ++++
10 |  chrome/browser/flag_descriptions.cc | 5 +++++
11 |  chrome/browser/flag_descriptions.h  | 3 +++
12 |  media/base/media_switches.cc        | 8 ++------
13 |  4 files changed, 14 insertions(+), 6 deletions(-)
14 | 
15 | diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
16 | --- a/chrome/browser/about_flags.cc
17 | +++ b/chrome/browser/about_flags.cc
18 | @@ -3661,6 +3661,10 @@ const FeatureEntry kFeatureEntries[] = {
19 |       SINGLE_VALUE_TYPE(extensions::switches::kExtensionsOnChromeURLs)},
20 |  #endif  // ENABLE_EXTENSIONS
21 |  #if BUILDFLAG(IS_ANDROID)
22 | +    {"resume-background-video",
23 | +     flag_descriptions::kResumeBackgroundVideoName,
24 | +     flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
25 | +     FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
26 |      {"osk-resizes-visual-viewport-by-default",
27 |       flag_descriptions::kEnableOskResizesVisualViewportByDefaultName,
28 |       flag_descriptions::kEnableOskResizesVisualViewportByDefaultDescription,
29 | diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
30 | --- a/chrome/browser/flag_descriptions.cc
31 | +++ b/chrome/browser/flag_descriptions.cc
32 | @@ -1363,6 +1363,11 @@ const char kEnablePenetratingImageSelectionDescription[] =
33 |      "Enables image options to be surfaced in the context menu for nodes "
34 |      "covered by transparent overlays.";
35 |  
36 | +const char kResumeBackgroundVideoName[] = "Resume background video.";
37 | +const char kResumeBackgroundVideoDescription[] =
38 | +    "Resume background video playback when tab re-gains focus; additionally, "
39 | +    "it will pause video playback every single time you switch tabs.";
40 | +
41 |  const char kEnablePixelCanvasRecordingName[] = "Enable pixel canvas recording";
42 |  const char kEnablePixelCanvasRecordingDescription[] =
43 |      "Pixel canvas recording allows the compositor to raster contents aligned "
44 | diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
45 | --- a/chrome/browser/flag_descriptions.h
46 | +++ b/chrome/browser/flag_descriptions.h
47 | @@ -744,6 +744,9 @@ extern const char kEnablePortalsDescription[];
48 |  extern const char kEnablePortalsCrossOriginName[];
49 |  extern const char kEnablePortalsCrossOriginDescription[];
50 |  
51 | +extern const char kResumeBackgroundVideoName[];
52 | +extern const char kResumeBackgroundVideoDescription[];
53 | +
54 |  extern const char kEnablePixelCanvasRecordingName[];
55 |  extern const char kEnablePixelCanvasRecordingDescription[];
56 |  
57 | diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
58 | --- a/media/base/media_switches.cc
59 | +++ b/media/base/media_switches.cc
60 | @@ -302,12 +302,8 @@ BASE_FEATURE(kPreloadMetadataLazyLoad,
61 |  // Let videos be resumed via remote controls (for example, the notification)
62 |  // when in background.
63 |  BASE_FEATURE(kResumeBackgroundVideo,
64 | -             "resume-background-video",
65 | -#if BUILDFLAG(IS_ANDROID)
66 | -             base::FEATURE_ENABLED_BY_DEFAULT
67 | -#else
68 | -             base::FEATURE_DISABLED_BY_DEFAULT
69 | -#endif
70 | +             "resume-background-video",           // disabled by default
71 | +             base::FEATURE_DISABLED_BY_DEFAULT    // in Bromite
72 |  );
73 |  
74 |  // When enabled, MediaCapabilities will check with GPU Video Accelerator
75 | --
76 | 2.25.1
77 | 


--------------------------------------------------------------------------------
/build/patches/Add-flag-to-disable-external-intent-requests.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Tue, 25 May 2021 19:46:14 +0200
 3 | Subject: Add flag to disable external intent requests
 4 | 
 5 | Adds a new flag that allows to control the switch with same name;
 6 | when flag is disabled no external intent will ever be allowed, for any URL.
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  chrome/browser/about_flags.cc       | 3 +++
11 |  chrome/browser/flag_descriptions.cc | 6 ++++++
12 |  chrome/browser/flag_descriptions.h  | 3 +++
13 |  3 files changed, 12 insertions(+)
14 | 
15 | diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
16 | --- a/chrome/browser/about_flags.cc
17 | +++ b/chrome/browser/about_flags.cc
18 | @@ -3621,6 +3621,9 @@ const FeatureEntry kFeatureEntries[] = {
19 |      {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
20 |       flag_descriptions::kUiPartialSwapDescription, kOsAll,
21 |       SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
22 | +    {"disable-external-intent-requests", flag_descriptions::kDisableExternalIntentRequestsName,
23 | +     flag_descriptions::kDisableExternalIntentRequestsDescription, kOsAll,
24 | +     SINGLE_DISABLE_VALUE_TYPE("disable-external-intent-requests")},
25 |      {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
26 |       flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
27 |       SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
28 | diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
29 | --- a/chrome/browser/flag_descriptions.cc
30 | +++ b/chrome/browser/flag_descriptions.cc
31 | @@ -3966,6 +3966,12 @@ const char kPhotoPickerVideoSupportName[] = "Photo Picker Video Support";
32 |  const char kPhotoPickerVideoSupportDescription[] =
33 |      "Enables video files to be shown in the Photo Picker dialog";
34 |  
35 | +const char kDisableExternalIntentRequestsName[] =
36 | +    "Never forward URL requests to external intents";
37 | +const char kDisableExternalIntentRequestsDescription[] =
38 | +    "URL requests will never"
39 | +    "allow for redirecting to an external intent.";
40 | +
41 |  const char kQueryTilesName[] = "Show query tiles";
42 |  const char kQueryTilesDescription[] = "Shows query tiles in Chrome";
43 |  const char kQueryTilesNTPName[] = "Show query tiles in NTP";
44 | diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
45 | --- a/chrome/browser/flag_descriptions.h
46 | +++ b/chrome/browser/flag_descriptions.h
47 | @@ -2274,6 +2274,9 @@ extern const char kQueryTilesNTPDescription[];
48 |  extern const char kQueryTilesOnStartName[];
49 |  extern const char kQueryTilesOnStartDescription[];
50 |  extern const char kQueryTilesSingleTierName[];
51 | +extern const char kDisableExternalIntentRequestsName[];
52 | +extern const char kDisableExternalIntentRequestsDescription[];
53 | +
54 |  extern const char kQueryTilesSingleTierDescription[];
55 |  extern const char kQueryTilesEnableQueryEditingName[];
56 |  extern const char kQueryTilesEnableQueryEditingDescription[];
57 | --
58 | 2.25.1
59 | 


--------------------------------------------------------------------------------
/build/patches/Add-support-for-ISupportHelpAndFeedback.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Mon, 17 May 2021 12:30:12 +0000
 3 | Subject: Add support for ISupportHelpAndFeedback
 4 | 
 5 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  .../chrome/browser/settings/SettingsActivity.java     | 11 ++++++++---
 9 |  .../components/browser_ui/settings/SettingsUtils.java |  4 ++++
10 |  2 files changed, 12 insertions(+), 3 deletions(-)
11 | 
12 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
13 | --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
14 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
15 | @@ -66,6 +66,7 @@ import org.chromium.components.browser_ui.bottomsheet.BottomSheetControllerFacto
16 |  import org.chromium.components.browser_ui.modaldialog.AppModalPresenter;
17 |  import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher;
18 |  import org.chromium.components.browser_ui.settings.SettingsLauncher;
19 | +import org.chromium.components.browser_ui.settings.SettingsUtils;
20 |  import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
21 |  import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
22 |  import org.chromium.components.browser_ui.widget.displaystyle.ViewResizer;
23 | @@ -329,9 +330,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
24 |              finish();
25 |              return true;
26 |          } else if (item.getItemId() == R.id.menu_id_general_help) {
27 | -            HelpAndFeedbackLauncherImpl.getInstance().show(this,
28 | -                    getString(R.string.help_context_settings), Profile.getLastUsedRegularProfile(),
29 | -                    null);
30 | +            if (mainFragment instanceof SettingsUtils.ISupportHelpAndFeedback) {
31 | +                ((SettingsUtils.ISupportHelpAndFeedback)mainFragment).onHelpAndFeebackPressed();
32 | +            } else {
33 | +                HelpAndFeedbackLauncherImpl.getInstance().show(this,
34 | +                        getString(R.string.help_context_settings), Profile.getLastUsedRegularProfile(),
35 | +                        null);
36 | +            }
37 |              return true;
38 |          }
39 |          return super.onOptionsItemSelected(item);
40 | diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
41 | --- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
42 | +++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
43 | @@ -97,4 +97,8 @@ public class SettingsUtils {
44 |          ToolbarUtils.setOverflowMenuVisibility(toolbar, visibility);
45 |          return true;
46 |      }
47 | +
48 | +    public interface ISupportHelpAndFeedback {
49 | +        void onHelpAndFeebackPressed();
50 | +    }
51 |  }
52 | --
53 | 2.25.1
54 | 


--------------------------------------------------------------------------------
/build/patches/Allow-building-without-supervised-users.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 21 Feb 2022 01:24:11 +0100
 3 | Subject: Allow building without supervised users
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../browser/supervised_user/ChildAccountService.java  | 11 -----------
 8 |  .../child_accounts/child_account_service_android.cc   |  9 ---------
 9 |  2 files changed, 20 deletions(-)
10 | 
11 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java b/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
12 | --- a/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
13 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/supervised_user/ChildAccountService.java
14 | @@ -31,21 +31,10 @@ public class ChildAccountService {
15 |          ThreadUtils.assertOnUiThread();
16 |          final Activity activity = windowAndroid.getActivity().get();
17 |          if (activity == null) {
18 | -            PostTask.postTask(UiThreadTaskTraits.DEFAULT, () -> {
19 | -                ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
20 | -            });
21 |              return;
22 |          }
23 |          Account account = AccountUtils.createAccountFromName(accountName);
24 |          AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity, success -> {
25 | -            if (!success) {
26 | -                ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
27 | -            }
28 |          });
29 |      }
30 | -
31 | -    @NativeMethods
32 | -    interface Natives {
33 | -        void onReauthenticationFailed(long onFailureCallbackPtr);
34 | -    }
35 |  }
36 | diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
37 | --- a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
38 | +++ b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
39 | @@ -39,12 +39,3 @@ void ReauthenticateChildAccount(
40 |        env, window_android->GetJavaObject(), ConvertUTF8ToJavaString(env, email),
41 |        reinterpret_cast<jlong>(callback_copy.release()));
42 |  }
43 | -
44 | -void JNI_ChildAccountService_OnReauthenticationFailed(JNIEnv* env,
45 | -                                                      jlong jcallbackPtr) {
46 | -  // Cast the pointer value back to a Callback and take ownership of it.
47 | -  std::unique_ptr<base::RepeatingCallback<void()>> callback(
48 | -      reinterpret_cast<base::RepeatingCallback<void()>*>(jcallbackPtr));
49 | -
50 | -  callback->Run();
51 | -}
52 | --
53 | 2.25.1
54 | 


--------------------------------------------------------------------------------
/build/patches/Allow-playing-audio-in-background.patch:
--------------------------------------------------------------------------------
 1 | From: AlexeyBarabash <alexey@brave.com>
 2 | Date: Thu, 2 Nov 2017 18:21:16 +0200
 3 | Subject: Allow playing audio in background
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../renderer/platform/media/web_media_player_impl.cc | 12 +++++++++++-
 8 |  .../renderer/platform/media/web_media_player_impl.h  |  3 +++
 9 |  2 files changed, 14 insertions(+), 1 deletion(-)
10 | 
11 | diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
12 | --- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
13 | +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
14 | @@ -1226,6 +1226,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
15 |    return pipeline_metadata_.has_audio;
16 |  }
17 |  
18 | +bool WebMediaPlayerImpl::HasVideoNonEmptySize() const {
19 | +  DCHECK(main_task_runner_->BelongsToCurrentThread());
20 | +
21 | +  return pipeline_metadata_.has_video && pipeline_metadata_.natural_size.width() != 0 && pipeline_metadata_.natural_size.height() != 0;
22 | +}
23 | +
24 |  void WebMediaPlayerImpl::EnabledAudioTracksChanged(
25 |      const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) {
26 |    DCHECK(main_task_runner_->BelongsToCurrentThread());
27 | @@ -3627,7 +3633,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
28 |    // Audio only stream is allowed to play when in background.
29 |    // TODO: We should check IsBackgroundOptimizationCandidate here. But we need
30 |    // to move the logic of checking video frames out of that function.
31 | -  if (!HasVideo())
32 | +
33 | +  //pipeline_metadata_.has_video is true for MediaPlayerRenderer,
34 | +  //see media/base/pipeline_metadata.h. This is a workaround to allow audio
35 | +  //streams be played in background.
36 | +  if (!HasVideoNonEmptySize())
37 |      return false;
38 |  
39 |    if (using_media_player_renderer_ &&
40 | diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.h b/third_party/blink/renderer/platform/media/web_media_player_impl.h
41 | --- a/third_party/blink/renderer/platform/media/web_media_player_impl.h
42 | +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.h
43 | @@ -195,6 +195,9 @@ class PLATFORM_EXPORT WebMediaPlayerImpl
44 |    bool HasVideo() const override;
45 |    bool HasAudio() const override;
46 |  
47 | +  // True is has video and it's frame size is not zero
48 | +  bool HasVideoNonEmptySize() const;
49 | +
50 |    void EnabledAudioTracksChanged(
51 |        const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) override;
52 |    void SelectedVideoTrackChanged(
53 | --
54 | 2.25.1
55 | 


--------------------------------------------------------------------------------
/build/patches/Always-use-new-tab-page-for-default-home-page.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 27 Jun 2018 11:02:38 +0200
 3 | Subject: Always use new tab page for default home page
 4 | 
 5 | Ignore any partner-provided home page.
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../org/chromium/chrome/browser/homepage/HomepageManager.java | 4 ----
10 |  1 file changed, 4 deletions(-)
11 | 
12 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
13 | --- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
14 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
15 | @@ -147,10 +147,6 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat
16 |       *         if the homepage button is force enabled via flag.
17 |       */
18 |      public static String getDefaultHomepageUri() {
19 | -        if (PartnerBrowserCustomizations.getInstance().isHomepageProviderAvailableAndEnabled()) {
20 | -            return PartnerBrowserCustomizations.getInstance().getHomePageUrl().getSpec();
21 | -        }
22 | -
23 |          String homepagePartnerDefaultUri;
24 |          String homepagePartnerDefaultGurlSerialized =
25 |                  SharedPreferencesManager.getInstance().readString(
26 | --
27 | 2.25.1
28 | 


--------------------------------------------------------------------------------
/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 25 Mar 2018 21:49:37 +0200
 3 | Subject: AudioBuffer, AnalyserNode: fp mitigations
 4 | 
 5 | Truncate base latency precision to two digits
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../blink/renderer/modules/webaudio/analyser_node.idl     | 8 ++++----
10 |  .../blink/renderer/modules/webaudio/audio_buffer.idl      | 6 ------
11 |  .../blink/renderer/modules/webaudio/audio_context.cc      | 4 +++-
12 |  3 files changed, 7 insertions(+), 11 deletions(-)
13 | 
14 | diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.idl b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
15 | --- a/third_party/blink/renderer/modules/webaudio/analyser_node.idl
16 | +++ b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
17 | @@ -40,10 +40,10 @@
18 |  
19 |      // Copies the current frequency data into the passed array.
20 |      // If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
21 | -    [HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
22 | -    [HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
23 | +    //[HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
24 | +    //[HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
25 |  
26 |      // Real-time waveform data
27 | -    [HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
28 | -    [HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
29 | +    //[HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
30 | +    //[HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
31 |  };
32 | diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
33 | --- a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
34 | +++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
35 | @@ -37,12 +37,6 @@
36 |  
37 |      // Channel access
38 |      readonly attribute unsigned long numberOfChannels;
39 | -    [HighEntropy=Direct, Measure, RaisesException] Float32Array getChannelData(
40 | -        unsigned long channelIndex);
41 | -    [HighEntropy, Measure, RaisesException] void copyFromChannel(
42 | -        Float32Array destination,
43 | -        unsigned long channelNumber,
44 | -        optional unsigned long bufferOffset = 0);
45 |      [RaisesException] void copyToChannel(
46 |          Float32Array source,
47 |          unsigned long channelNumber,
48 | diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
49 | --- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
50 | +++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
51 | @@ -508,7 +508,9 @@ double AudioContext::baseLatency() const {
52 |    DCHECK(IsMainThread());
53 |    DCHECK(destination());
54 |  
55 | -  return base_latency_;
56 | +  // remove precision past two decimal digits
57 | +  int l = base_latency_ * 100;
58 | +  return double(l)/100;
59 |  }
60 |  
61 |  double AudioContext::outputLatency() const {
62 | --
63 | 2.25.1
64 | 


--------------------------------------------------------------------------------
/build/patches/Battery-API-return-nothing.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 22 Mar 2018 22:11:57 +0100
 3 | Subject: Battery API: return nothing
 4 | 
 5 | Include @thestinger's fix for correct charging/unknown values
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../modules/battery/battery_manager.cc        | 26 +++----------------
10 |  1 file changed, 4 insertions(+), 22 deletions(-)
11 | 
12 | diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/third_party/blink/renderer/modules/battery/battery_manager.cc
13 | --- a/third_party/blink/renderer/modules/battery/battery_manager.cc
14 | +++ b/third_party/blink/renderer/modules/battery/battery_manager.cc
15 | @@ -77,46 +77,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
16 |  }
17 |  
18 |  bool BatteryManager::charging() {
19 | -  return battery_status_.Charging();
20 | +  return true;
21 |  }
22 |  
23 |  double BatteryManager::chargingTime() {
24 | -  return battery_status_.charging_time().InSecondsF();
25 | +  return 0.0;
26 |  }
27 |  
28 |  double BatteryManager::dischargingTime() {
29 | -  return battery_status_.discharging_time().InSecondsF();
30 | +  return std::numeric_limits<double>::infinity();
31 |  }
32 |  
33 |  double BatteryManager::level() {
34 | -  return battery_status_.Level();
35 | +  return 1.0;
36 |  }
37 |  
38 |  void BatteryManager::DidUpdateData() {
39 |    DCHECK(battery_property_);
40 |  
41 | -  BatteryStatus old_status = battery_status_;
42 | -  battery_status_ = *battery_dispatcher_->LatestData();
43 | -
44 |    if (battery_property_->GetState() == BatteryProperty::kPending) {
45 |      battery_property_->Resolve(this);
46 |      return;
47 |    }
48 | -
49 | -  DCHECK(GetExecutionContext());
50 | -  if (GetExecutionContext()->IsContextPaused() ||
51 | -      GetExecutionContext()->IsContextDestroyed()) {
52 | -    return;
53 | -  }
54 | -
55 | -  if (battery_status_.Charging() != old_status.Charging())
56 | -    DispatchEvent(*Event::Create(event_type_names::kChargingchange));
57 | -  if (battery_status_.charging_time() != old_status.charging_time())
58 | -    DispatchEvent(*Event::Create(event_type_names::kChargingtimechange));
59 | -  if (battery_status_.discharging_time() != old_status.discharging_time())
60 | -    DispatchEvent(*Event::Create(event_type_names::kDischargingtimechange));
61 | -  if (battery_status_.Level() != old_status.Level())
62 | -    DispatchEvent(*Event::Create(event_type_names::kLevelchange));
63 |  }
64 |  
65 |  void BatteryManager::RegisterWithDispatcher() {
66 | --
67 | 2.25.1
68 | 


--------------------------------------------------------------------------------
/build/patches/Bromite-package-name.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 8 Jan 2022 19:42:34 +0100
 3 | Subject: Bromite package name
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/android/BUILD.gn | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
11 | --- a/chrome/android/BUILD.gn
12 | +++ b/chrome/android/BUILD.gn
13 | @@ -47,7 +47,7 @@ chrome_jni_registration_header =
14 |  chrome_jni_for_test_registration_header = "$root_build_dir/gen/chrome/browser/android/chrome_jni_for_test_registration.h"
15 |  
16 |  if (current_toolchain == default_toolchain) {
17 | -  _default_package = "org.chromium.chrome"
18 | +  _default_package = "org.bromite.bromite"
19 |    if (use_stable_package_name_for_trichrome) {
20 |      _default_package += ".stable"
21 |    } else if (android_channel != "default" && android_channel != "stable") {
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Chromium-package-name.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 8 Jan 2022 19:42:34 +0100
 3 | Subject: Chromium package name
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/android/BUILD.gn | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
11 | --- a/chrome/android/BUILD.gn
12 | +++ b/chrome/android/BUILD.gn
13 | @@ -51,7 +51,7 @@ chrome_jni_registration_header =
14 |  chrome_jni_for_test_registration_header = "$root_build_dir/gen/chrome/browser/android/chrome_jni_for_test_registration.h"
15 |  
16 |  if (current_toolchain == default_toolchain) {
17 | -  _default_package = "org.chromium.chrome"
18 | +  _default_package = "org.bromite.chromium"
19 |    if (use_stable_package_name_for_trichrome) {
20 |      _default_package += ".stable"
21 |    } else if (android_channel != "default" && android_channel != "stable") {
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Clamp-time-resolution-in-requestAnimationFrame.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Mon, 3 Oct 2022 09:39:07 +0000
 3 | Subject: Clamp time resolution in requestAnimationFrame
 4 | 
 5 | Aligns requestAnimationFrame's WebWorker callback to the W3C specification
 6 | See https://bugs.chromium.org/p/chromium/issues/detail?id=1236113
 7 | 
 8 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  .../animation_frame/worker_animation_frame_provider.cc    | 8 +++++++-
12 |  1 file changed, 7 insertions(+), 1 deletion(-)
13 | 
14 | diff --git a/third_party/blink/renderer/core/animation_frame/worker_animation_frame_provider.cc b/third_party/blink/renderer/core/animation_frame/worker_animation_frame_provider.cc
15 | --- a/third_party/blink/renderer/core/animation_frame/worker_animation_frame_provider.cc
16 | +++ b/third_party/blink/renderer/core/animation_frame/worker_animation_frame_provider.cc
17 | @@ -7,6 +7,8 @@
18 |  #include "base/trace_event/trace_event.h"
19 |  #include "third_party/blink/renderer/core/execution_context/agent.h"
20 |  #include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h"
21 | +#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
22 | +#include "third_party/blink/renderer/platform/wtf/casting.h"
23 |  #include "third_party/blink/renderer/core/timing/worker_global_scope_performance.h"
24 |  #include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
25 |  #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
26 | @@ -63,7 +65,11 @@ void WorkerAnimationFrameProvider::BeginFrame(const viz::BeginFrameArgs& args) {
27 |              }
28 |            }
29 |  
30 | -          double time = (args.frame_time - base::TimeTicks()).InMillisecondsF();
31 | +          auto* global_scope = DynamicTo<WorkerGlobalScope>(provider->context_.Get());
32 | +          DCHECK(global_scope);
33 | +          double time = Performance::ClampTimeResolution(
34 | +                          args.frame_time - global_scope->TimeOrigin(),
35 | +                          provider->context_->CrossOriginIsolatedCapability());
36 |            provider->callback_collection_.ExecuteFrameCallbacks(time, time);
37 |          }
38 |          provider->begin_frame_provider_->FinishBeginFrame(args);
39 | --
40 | 2.25.1
41 | 


--------------------------------------------------------------------------------
/build/patches/Disable-AsyncDNS-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 26 Mar 2022 16:41:55 +0100
 3 | Subject: Disable AsyncDNS by default
 4 | 
 5 | This feature is detrimental to privacy, see also:
 6 | * https://bugs.chromium.org/p/chromium/issues/detail?id=805020
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  chrome/common/chrome_features.cc | 8 ++------
11 |  1 file changed, 2 insertions(+), 6 deletions(-)
12 | 
13 | diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
14 | --- a/chrome/common/chrome_features.cc
15 | +++ b/chrome/common/chrome_features.cc
16 | @@ -98,12 +98,8 @@ BASE_FEATURE(kAppShimNewCloseBehavior,
17 |  
18 |  // Enables the built-in DNS resolver.
19 |  BASE_FEATURE(kAsyncDns,
20 | -             "AsyncDns",
21 | -#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID)
22 | -             base::FEATURE_ENABLED_BY_DEFAULT
23 | -#else
24 | -             base::FEATURE_DISABLED_BY_DEFAULT
25 | -#endif
26 | +             "AsyncDns",                                // disabled by default
27 | +            base::FEATURE_DISABLED_BY_DEFAULT           // in Bromite
28 |  );
29 |  
30 |  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
31 | --
32 | 2.25.1
33 | 


--------------------------------------------------------------------------------
/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 24 Jan 2020 09:46:48 +0100
 3 | Subject: Disable DRM media origin IDs preprovisioning
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  media/base/media_switches.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
11 | --- a/media/base/media_switches.cc
12 | +++ b/media/base/media_switches.cc
13 | @@ -843,8 +843,8 @@ BASE_FEATURE(kMediaDrmPersistentLicense,
14 |  // MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs
15 |  // which will trigger provisioning process after MediaDrmBridge is created.
16 |  BASE_FEATURE(kMediaDrmPreprovisioning,
17 | -             "MediaDrmPreprovisioning",
18 | -             base::FEATURE_ENABLED_BY_DEFAULT);
19 | +             "MediaDrmPreprovisioning",             // must be disabled
20 | +             base::FEATURE_DISABLED_BY_DEFAULT);    // in Bromite
21 |  
22 |  // Determines if MediaDrmOriginIdManager should attempt to pre-provision origin
23 |  // IDs at startup (whenever a profile is loaded). Also used by tests that
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Disable-NTP-remote-suggestions-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 12 Oct 2017 08:15:17 +0200
 3 | Subject: Disable NTP remote suggestions by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/feed/core/shared_prefs/pref_names.cc | 4 ++--
 8 |  components/ntp_snippets/features.cc             | 8 ++++----
 9 |  2 files changed, 6 insertions(+), 6 deletions(-)
10 | 
11 | diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/core/shared_prefs/pref_names.cc
12 | --- a/components/feed/core/shared_prefs/pref_names.cc
13 | +++ b/components/feed/core/shared_prefs/pref_names.cc
14 | @@ -20,8 +20,8 @@ const char kArticlesListVisible[] = "ntp_snippets.list_visible";
15 |  const char kVideoPreviewsType[] = "ntp_snippets.video_previews_type";
16 |  
17 |  void RegisterFeedSharedProfilePrefs(PrefRegistrySimple* registry) {
18 | -  registry->RegisterBooleanPref(kEnableSnippets, true);
19 | -  registry->RegisterBooleanPref(kArticlesListVisible, true);
20 | +  registry->RegisterBooleanPref(kEnableSnippets, false);
21 | +  registry->RegisterBooleanPref(kArticlesListVisible, false);
22 |    registry->RegisterIntegerPref(kVideoPreviewsType, 1);
23 |  }
24 |  
25 | diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/features.cc
26 | --- a/components/ntp_snippets/features.cc
27 | +++ b/components/ntp_snippets/features.cc
28 | @@ -39,8 +39,8 @@ const base::Feature* const kAllFeatures[] = {
29 |      &kOptionalImagesEnabledFeature};
30 |  
31 |  BASE_FEATURE(kArticleSuggestionsFeature,
32 | -             "NTPArticleSuggestions",
33 | -             base::FEATURE_ENABLED_BY_DEFAULT);
34 | +             "NTPArticleSuggestions",                            // disabled by default
35 | +             base::FEATURE_DISABLED_BY_DEFAULT);                 // in Bromite
36 |  
37 |  BASE_FEATURE(kRemoteSuggestionsEmulateM58FetchingSchedule,
38 |               "RemoteSuggestionsEmulateM58FetchingSchedule",
39 | @@ -71,8 +71,8 @@ const char kNotificationsDailyLimit[] = "daily_limit";
40 |  const char kNotificationsIgnoredLimitParam[] = "ignored_limit";
41 |  
42 |  BASE_FEATURE(kKeepPrefetchedContentSuggestions,
43 | -             "KeepPrefetchedContentSuggestions",
44 | -             base::FEATURE_ENABLED_BY_DEFAULT);
45 | +             "KeepPrefetchedContentSuggestions",                // disabled by default
46 | +             base::FEATURE_DISABLED_BY_DEFAULT);                // in Bromite
47 |  
48 |  BASE_FEATURE(kOptionalImagesEnabledFeature,
49 |               "NTPRemoteSuggestionsOptionalImages",
50 | --
51 | 2.25.1
52 | 


--------------------------------------------------------------------------------
/build/patches/Disable-PrivacyGuide.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 31 Jul 2022 22:13:11 +0200
 3 | Subject: Disable PrivacyGuide
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/common/chrome_features.cc | 10 +++++-----
 8 |  1 file changed, 5 insertions(+), 5 deletions(-)
 9 | 
10 | diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
11 | --- a/chrome/common/chrome_features.cc
12 | +++ b/chrome/common/chrome_features.cc
13 | @@ -500,8 +500,8 @@ BASE_FEATURE(kHaTSDesktopDevToolsIssuesCSP,
14 |  
15 |  // Enables or disables the Happiness Tracking System for Desktop Privacy Guide.
16 |  BASE_FEATURE(kHappinessTrackingSurveysForDesktopPrivacyGuide,
17 | -             "HappinessTrackingSurveysForDesktopPrivacyGuide",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "HappinessTrackingSurveysForDesktopPrivacyGuide",                      // must be disabled
20 | +             base::FEATURE_DISABLED_BY_DEFAULT);                                    // in Bromite
21 |  const base::FeatureParam<base::TimeDelta>
22 |      kHappinessTrackingSurveysForDesktopPrivacyGuideTime{
23 |          &kHappinessTrackingSurveysForDesktopPrivacyGuide, "settings-time",
24 | @@ -910,11 +910,11 @@ BASE_FEATURE(kPrerenderFallbackToPreconnect,
25 |               "PrerenderFallbackToPreconnect",
26 |               base::FEATURE_ENABLED_BY_DEFAULT);
27 |  
28 | -BASE_FEATURE(kPrivacyGuide2, "PrivacyGuide2", base::FEATURE_ENABLED_BY_DEFAULT);
29 | +BASE_FEATURE(kPrivacyGuide2, "PrivacyGuide2", base::FEATURE_DISABLED_BY_DEFAULT); // always disabled in Bromite
30 |  
31 |  BASE_FEATURE(kPrivacyGuideAndroid,
32 | -             "PrivacyGuideAndroid",
33 | -             base::FEATURE_DISABLED_BY_DEFAULT);
34 | +             "PrivacyGuideAndroid",               // always disabled
35 | +             base::FEATURE_DISABLED_BY_DEFAULT);  // in Bromite
36 |  
37 |  // Enables or disables push subscriptions keeping Chrome running in the
38 |  // background when closed.
39 | --
40 | 2.25.1
41 | 


--------------------------------------------------------------------------------
/build/patches/Disable-StartSurface-feature.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 16 Nov 2022 11:18:07 +0100
 3 | Subject: Disable StartSurface feature
 4 | 
 5 | This feature would normally show a search box but leads to crashes.
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/flags/android/chrome_feature_list.cc | 4 ++--
10 |  1 file changed, 2 insertions(+), 2 deletions(-)
11 | 
12 | diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
13 | --- a/chrome/browser/flags/android/chrome_feature_list.cc
14 | +++ b/chrome/browser/flags/android/chrome_feature_list.cc
15 | @@ -1081,8 +1081,8 @@ BASE_FEATURE(kShowExtendedPreloadingSetting,
16 |               base::FEATURE_ENABLED_BY_DEFAULT);
17 |  
18 |  BASE_FEATURE(kStartSurfaceAndroid,
19 | -             "StartSurfaceAndroid",
20 | -             base::FEATURE_ENABLED_BY_DEFAULT);
21 | +             "StartSurfaceAndroid",                 // must be disabled
22 | +             base::FEATURE_DISABLED_BY_DEFAULT);    // in Bromite
23 |  
24 |  BASE_FEATURE(kFeedPositionAndroid,
25 |               "FeedPositionAndroid",
26 | --
27 | 2.25.1
28 | 


--------------------------------------------------------------------------------
/build/patches/Disable-UA-full-version.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Wed, 16 Feb 2022 14:28:58 +0000
 3 | Subject: Disable UA full version
 4 | 
 5 | getHighEntropyValues will return only the major version
 6 | 
 7 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  .../renderer/core/frame/navigator_ua_data.cc     | 16 ++++++++++++++--
11 |  1 file changed, 14 insertions(+), 2 deletions(-)
12 | 
13 | diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_party/blink/renderer/core/frame/navigator_ua_data.cc
14 | --- a/third_party/blink/renderer/core/frame/navigator_ua_data.cc
15 | +++ b/third_party/blink/renderer/core/frame/navigator_ua_data.cc
16 | @@ -6,6 +6,8 @@
17 |  
18 |  #include "base/compiler_specific.h"
19 |  #include "base/task/single_thread_task_runner.h"
20 | +#include "base/version.h"
21 | +#include "base/strings/strcat.h"
22 |  #include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
23 |  #include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
24 |  #include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
25 | @@ -39,6 +41,16 @@ void MaybeRecordMetric(bool record_identifiability,
26 |        .Record(execution_context->UkmRecorder());
27 |  }
28 |  
29 | +const String GetReducedVersionNumber(const std::string& fullVersion) {
30 | +  base::Version version(fullVersion);
31 | +  std::string version_str;
32 | +  const std::vector<uint32_t>& components = version.components();
33 | +  if (components.size() > 0) {
34 | +    version_str = base::StrCat({base::NumberToString(components[0]), ".0.0.0"});
35 | +  }
36 | +  return String::FromUTF8(version_str);
37 | +}
38 | +
39 |  }  // namespace
40 |  
41 |  NavigatorUAData::NavigatorUAData(ExecutionContext* context)
42 | @@ -77,7 +89,7 @@ void NavigatorUAData::SetFullVersionList(
43 |      const UserAgentBrandList& full_version_list) {
44 |    for (const auto& brand_version : full_version_list) {
45 |      AddBrandFullVersion(String::FromUTF8(brand_version.brand),
46 | -                        String::FromUTF8(brand_version.version));
47 | +        GetReducedVersionNumber(brand_version.version));
48 |    }
49 |  }
50 |  
51 | @@ -99,7 +111,7 @@ void NavigatorUAData::SetModel(const String& model) {
52 |  }
53 |  
54 |  void NavigatorUAData::SetUAFullVersion(const String& ua_full_version) {
55 | -  ua_full_version_ = ua_full_version;
56 | +  ua_full_version_ = GetReducedVersionNumber(ua_full_version.Ascii());
57 |  }
58 |  
59 |  void NavigatorUAData::SetBitness(const String& bitness) {
60 | --
61 | 2.25.1
62 | 


--------------------------------------------------------------------------------
/build/patches/Disable-add-to-home-screen-prompt.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 28 Sep 2022 00:54:10 +0200
 3 | Subject: Disable add to home screen prompt
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../webapps/AddToHomescreenMostVisitedTileClickObserver.java | 5 +----
 8 |  1 file changed, 1 insertion(+), 4 deletions(-)
 9 | 
10 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java
11 | --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java
12 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java
13 | @@ -43,10 +43,7 @@ public class AddToHomescreenMostVisitedTileClickObserver implements MostVisitedT
14 |                      ntp.addMostVisitedTileClickObserver(
15 |                              AddToHomescreenMostVisitedTileClickObserver.this);
16 |                  } else {
17 | -                    // If it is a regular web page, and started from a most visited tile, show IPH.
18 | -                    if (url.getOrigin().equals(mLastClickedMostVisitedTileUrl)) {
19 | -                        addToHomescreenIPHController.showAddToHomescreenIPH(tab);
20 | -                    }
21 | +                    // do not show any add to home screen IPH in Bromite
22 |                      removeObserver(tab);
23 |                  }
24 |                  mLastClickedMostVisitedTileUrl = null;
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/Disable-all-promo-dialogs.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Tue, 12 Jun 2018 15:09:26 +0200
 3 | Subject: Disable all promo dialogs
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 6 +++---
 8 |  1 file changed, 3 insertions(+), 3 deletions(-)
 9 | 
10 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
11 | --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
12 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
13 | @@ -851,7 +851,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
14 |       * displayed.
15 |       */
16 |      private boolean triggerPromo(boolean intentWithEffect) {
17 | -        try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
18 | +        /*try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
19 |              if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_STARTUP_PROMOS)) {
20 |                  return false;
21 |              }
22 | @@ -886,8 +886,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
23 |                  preferenceManager.writeBoolean(
24 |                          ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
25 |              }
26 | -            return isShowingPromo;
27 | -        }
28 | +            return isShowingPromo;        } */
29 | +            return false;
30 |      }
31 |  
32 |      @VisibleForTesting
33 | --
34 | 2.25.1
35 | 


--------------------------------------------------------------------------------
/build/patches/Disable-crash-reporting.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 9 Apr 2022 21:43:35 +0200
 3 | Subject: Disable crash reporting
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  content/public/common/content_features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
11 | --- a/content/public/common/content_features.cc
12 | +++ b/content/public/common/content_features.cc
13 | @@ -241,8 +241,8 @@ BASE_FEATURE(kCooperativeScheduling,
14 |  // Enables crash reporting via Reporting API.
15 |  // https://www.w3.org/TR/reporting/#crash-report
16 |  BASE_FEATURE(kCrashReporting,
17 | -             "CrashReporting",
18 | -             base::FEATURE_ENABLED_BY_DEFAULT);
19 | +             "CrashReporting",                      // disabled by default
20 | +             base::FEATURE_DISABLED_BY_DEFAULT);    // in Bromite
21 |  
22 |  // Enables support for the `Critical-CH` response header.
23 |  // https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Disable-feeds-support-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 19 Dec 2019 22:52:53 +0100
 3 | Subject: Disable feeds support by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../org/chromium/chrome/browser/feed/FeedFeatures.java    | 8 +-------
 8 |  .../chromium/chrome/browser/flags/CachedFeatureFlags.java | 2 +-
 9 |  components/feed/feed_feature_list.cc                      | 8 ++++----
10 |  3 files changed, 6 insertions(+), 12 deletions(-)
11 | 
12 | diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
13 | --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
14 | +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
15 | @@ -50,13 +50,7 @@ public final class FeedFeatures {
16 |       *         the user is signed in and confirms it's not a child profile.
17 |       */
18 |      public static boolean isWebFeedUIEnabled() {
19 | -        // TODO(b/197354832, b/188188861): change consent check to SIGNIN.
20 | -        return ChromeFeatureList.isEnabled(ChromeFeatureList.WEB_FEED)
21 | -                && IdentityServicesProvider.get()
22 | -                           .getSigninManager(Profile.getLastUsedRegularProfile())
23 | -                           .getIdentityManager()
24 | -                           .hasPrimaryAccount(ConsentLevel.SYNC)
25 | -                && !Profile.getLastUsedRegularProfile().isChild();
26 | +        return false;
27 |      }
28 |  
29 |      public static boolean shouldUseWebFeedAwarenessIPH() {
30 | diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
31 | --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
32 | +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
33 | @@ -78,7 +78,7 @@ public class CachedFeatureFlags {
34 |                      .put(ChromeFeatureList.INCOGNITO_REAUTHENTICATION_FOR_ANDROID, false)
35 |                      .put(ChromeFeatureList.INSTANCE_SWITCHER, true)
36 |                      .put(ChromeFeatureList.INSTANT_START, false)
37 | -                    .put(ChromeFeatureList.INTEREST_FEED_V2, true)
38 | +                    .put(ChromeFeatureList.INTEREST_FEED_V2, false)
39 |                      .put(ChromeFeatureList.LENS_CAMERA_ASSISTED_SEARCH, false)
40 |                      .put(ChromeFeatureList.NEW_WINDOW_APP_MENU, true)
41 |                      .put(ChromeFeatureList.OMAHA_MIN_SDK_VERSION_ANDROID, false)
42 | diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
43 | --- a/components/feed/feed_feature_list.cc
44 | +++ b/components/feed/feed_feature_list.cc
45 | @@ -17,14 +17,14 @@
46 |  namespace feed {
47 |  
48 |  BASE_FEATURE(kInterestFeedContentSuggestions,
49 | -             "InterestFeedContentSuggestions",
50 | -             base::FEATURE_ENABLED_BY_DEFAULT);
51 | +             "InterestFeedContentSuggestions",          // must be disabled
52 | +             base::FEATURE_DISABLED_BY_DEFAULT);        // by default in Bromite
53 |  // InterestFeedV2 takes precedence over InterestFeedContentSuggestions.
54 |  // InterestFeedV2 is cached in ChromeCachedFlags. If the default value here is
55 |  // changed, please update the cached one's default value in CachedFeatureFlags.
56 |  BASE_FEATURE(kInterestFeedV2,
57 | -             "InterestFeedV2",
58 | -             base::FEATURE_ENABLED_BY_DEFAULT);
59 | +             "InterestFeedV2",                          // must be disabled
60 | +             base::FEATURE_DISABLED_BY_DEFAULT);        // by default in Bromite
61 |  
62 |  BASE_FEATURE(kInterestFeedV2Autoplay,
63 |               "InterestFeedV2Autoplay",
64 | --
65 | 2.25.1
66 | 


--------------------------------------------------------------------------------
/build/patches/Disable-idle-detection.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 19 Feb 2022 12:01:33 +0100
 3 | Subject: Disable idle detection
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  content/public/common/content_features.cc | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
11 | --- a/content/public/common/content_features.cc
12 | +++ b/content/public/common/content_features.cc
13 | @@ -479,7 +479,7 @@ BASE_FEATURE(kGreaseUACH, "GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT);
14 |  // This is intended as a kill switch for the Idle Detection feature. To enable
15 |  // this feature, the experimental web platform features flag should be set,
16 |  // or the site should obtain an Origin Trial token.
17 | -BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_ENABLED_BY_DEFAULT);
18 | +BASE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_DISABLED_BY_DEFAULT);
19 |  
20 |  // A feature flag for the memory-backed code cache.
21 |  BASE_FEATURE(kInMemoryCodeCache,
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Disable-lock-icon-in-address-bar-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 8 Oct 2021 00:30:26 +0200
 3 | Subject: Disable lock icon in address bar by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/omnibox/common/omnibox_features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc
11 | --- a/components/omnibox/common/omnibox_features.cc
12 | +++ b/components/omnibox/common/omnibox_features.cc
13 | @@ -433,8 +433,8 @@ BASE_FEATURE(kSiteSearchStarterPack,
14 |  
15 |  // Experiment to introduce new security indicators for HTTPS.
16 |  BASE_FEATURE(kUpdatedConnectionSecurityIndicators,
17 | -             "OmniboxUpdatedConnectionSecurityIndicators",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "OmniboxUpdatedConnectionSecurityIndicators",    // enabled by default
20 | +             base::FEATURE_ENABLED_BY_DEFAULT);               // in Bromite
21 |  
22 |  // Feature used to default typed navigations to use HTTPS instead of HTTP.
23 |  // This only applies to navigations that don't have a scheme such as
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Disable-media-router-and-remoting-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Thu, 4 Jul 2019 19:08:52 -0400
 3 | Subject: Disable media router and remoting by default
 4 | 
 5 | Original License: MIT - https://spdx.org/licenses/MIT.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  .../media/router/media_router_feature.cc      | 27 ++++++-------------
 9 |  chrome/browser/profiles/profile_impl.cc       |  2 +-
10 |  2 files changed, 9 insertions(+), 20 deletions(-)
11 | 
12 | diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
13 | --- a/chrome/browser/media/router/media_router_feature.cc
14 | +++ b/chrome/browser/media/router/media_router_feature.cc
15 | @@ -59,26 +59,15 @@ BASE_FEATURE(kGlobalMediaControlsCastStartStop,
16 |  
17 |  #endif  // !BUILDFLAG(IS_ANDROID)
18 |  
19 | -namespace {
20 | -const PrefService::Preference* GetMediaRouterPref(
21 | -    content::BrowserContext* context) {
22 | -  return user_prefs::UserPrefs::Get(context)->FindPreference(
23 | -      ::prefs::kEnableMediaRouter);
24 | -}
25 | -
26 | -base::flat_map<content::BrowserContext*, bool>& GetStoredPrefValues() {
27 | -  static base::NoDestructor<base::flat_map<content::BrowserContext*, bool>>
28 | -      stored_pref_values;
29 | -
30 | -  return *stored_pref_values;
31 | -}
32 | -}  // namespace
33 | -
34 | -void ClearMediaRouterStoredPrefsForTesting() {
35 | +/*void ClearMediaRouterStoredPrefsForTesting() {
36 |    GetStoredPrefValues().clear();
37 | -}
38 | +}*/
39 |  
40 |  bool MediaRouterEnabled(content::BrowserContext* context) {
41 | +  return false;
42 | +}
43 | +
44 | +/*
45 |  #if !BUILDFLAG(IS_ANDROID)
46 |    if (!base::FeatureList::IsEnabled(kMediaRouter))
47 |      return false;
48 | @@ -106,7 +95,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
49 |      return allowed;
50 |    }
51 |    return true;
52 | -}
53 | +}*/
54 |  
55 |  #if !BUILDFLAG(IS_ANDROID)
56 |  void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
57 | @@ -119,7 +108,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
58 |                                 PrefRegistry::PUBLIC);
59 |  
60 |    registry->RegisterBooleanPref(
61 | -      media_router::prefs::kMediaRouterMediaRemotingEnabled, true);
62 | +      media_router::prefs::kMediaRouterMediaRemotingEnabled, false); // disabled in Bromite
63 |    registry->RegisterListPref(
64 |        media_router::prefs::kMediaRouterTabMirroringSources);
65 |  
66 | diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
67 | --- a/chrome/browser/profiles/profile_impl.cc
68 | +++ b/chrome/browser/profiles/profile_impl.cc
69 | @@ -411,7 +411,7 @@ void ProfileImpl::RegisterProfilePrefs(
70 |  #endif
71 |  
72 |    registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
73 | -  registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
74 | +  registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
75 |  #if !BUILDFLAG(IS_ANDROID)
76 |    registry->RegisterBooleanPref(prefs::kShowCastIconInToolbar, false);
77 |  #endif  // !BUILDFLAG(IS_ANDROID)
78 | --
79 | 2.25.1
80 | 


--------------------------------------------------------------------------------
/build/patches/Disable-minidump-upload-scheduling.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 27 Feb 2022 23:58:22 +0100
 3 | Subject: Disable minidump upload scheduling
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/endpoint_fetcher/endpoint_fetcher.cc              | 2 +-
 8 |  .../minidump_uploader/MinidumpUploadJobService.java          | 5 ++++-
 9 |  2 files changed, 5 insertions(+), 2 deletions(-)
10 | 
11 | diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoint_fetcher/endpoint_fetcher.cc
12 | --- a/components/endpoint_fetcher/endpoint_fetcher.cc
13 | +++ b/components/endpoint_fetcher/endpoint_fetcher.cc
14 | @@ -340,7 +340,7 @@ void EndpointFetcher::OnResponseFetched(
15 |      }
16 |    } else {
17 |      std::string net_error = net::ErrorToString(net_error_code);
18 | -    VLOG(1) << __func__ << " with response error: " << net_error;
19 | +    LOG(ERROR) << __func__ << " with response error: " << net_error;
20 |      response->response = "There was a response error";
21 |      std::move(endpoint_fetcher_callback).Run(std::move(response));
22 |    }
23 | diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
24 | --- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
25 | +++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
26 | @@ -45,7 +45,10 @@ public abstract class MinidumpUploadJobService extends JobService {
27 |       *     to build an upload job for scheduling.
28 |       */
29 |      public static void scheduleUpload(JobInfo.Builder jobInfoBuilder) {
30 | -        Log.i(TAG, "Scheduling upload of all pending minidumps.");
31 | +        Log.i(TAG, "Scheduling upload of all pending minidumps is disabled.");
32 | +        if ((true)) {
33 | +           return;
34 | +        }
35 |          JobScheduler scheduler =
36 |                  (JobScheduler) ContextUtils.getApplicationContext().getSystemService(
37 |                          Context.JOB_SCHEDULER_SERVICE);
38 | --
39 | 2.25.1
40 | 


--------------------------------------------------------------------------------
/build/patches/Disable-offline-pages-in-CCT.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 30 May 2019 03:37:45 +0200
 3 | Subject: Disable offline pages in CCT
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/offline_pages/core/offline_page_feature.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc
11 | --- a/components/offline_pages/core/offline_page_feature.cc
12 | +++ b/components/offline_pages/core/offline_page_feature.cc
13 | @@ -41,8 +41,8 @@ BASE_FEATURE(kOfflinePagesDescriptivePendingStatusFeature,
14 |               base::FEATURE_ENABLED_BY_DEFAULT);
15 |  
16 |  BASE_FEATURE(kOfflinePagesInDownloadHomeOpenInCctFeature,
17 | -             "OfflinePagesInDownloadHomeOpenInCct",
18 | -             base::FEATURE_ENABLED_BY_DEFAULT);
19 | +             "OfflinePagesInDownloadHomeOpenInCct",       // disabled by default
20 | +             base::FEATURE_DISABLED_BY_DEFAULT);          // in Bromite
21 |  
22 |  BASE_FEATURE(kOfflineIndicatorFeature,
23 |               "OfflineIndicator",
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 11 Oct 2017 23:24:58 +0200
 3 | Subject: Disable omission of URL elements in Omnibox
 4 | 
 5 | Disable all omissions because they are used throughout the code without
 6 | a corresponding user option to individually disable their usage.
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  .../toolbar/chrome_location_bar_model_delegate.cc  |  2 +-
11 |  components/url_formatter/url_formatter.cc          | 14 +++++++-------
12 |  2 files changed, 8 insertions(+), 8 deletions(-)
13 | 
14 | diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
15 | --- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
16 | +++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
17 | @@ -305,5 +305,5 @@ TemplateURLService* ChromeLocationBarModelDelegate::GetTemplateURLService() {
18 |  // static
19 |  void ChromeLocationBarModelDelegate::RegisterProfilePrefs(
20 |      user_prefs::PrefRegistrySyncable* registry) {
21 | -  registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, false);
22 | +  registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, true);
23 |  }
24 | diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
25 | --- a/components/url_formatter/url_formatter.cc
26 | +++ b/components/url_formatter/url_formatter.cc
27 | @@ -533,13 +533,13 @@ bool HasTwoViewSourceSchemes(base::StringPiece spec) {
28 |  }  // namespace
29 |  
30 |  const FormatUrlType kFormatUrlOmitNothing = 0;
31 | -const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0;
32 | -const FormatUrlType kFormatUrlOmitHTTP = 1 << 1;
33 | -const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2;
34 | -const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3;
35 | -const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5;
36 | -const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6;
37 | -const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
38 | +const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0;
39 | +const FormatUrlType kFormatUrlOmitHTTP = 0 << 1;
40 | +const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2;
41 | +const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3;
42 | +const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5;
43 | +const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6;
44 | +const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7;
45 |  const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
46 |  const FormatUrlType kFormatUrlOmitMobilePrefix = 1 << 9;
47 |  
48 | --
49 | 2.25.1
50 | 


--------------------------------------------------------------------------------
/build/patches/Disable-plugins-enumeration.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 22 Mar 2018 22:38:00 +0100
 3 | Subject: Disable plugins enumeration
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  third_party/blink/renderer/core/frame/local_frame.cc | 2 --
 8 |  1 file changed, 2 deletions(-)
 9 | 
10 | diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
11 | --- a/third_party/blink/renderer/core/frame/local_frame.cc
12 | +++ b/third_party/blink/renderer/core/frame/local_frame.cc
13 | @@ -1920,9 +1920,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
14 |  }
15 |  
16 |  PluginData* LocalFrame::GetPluginData() const {
17 | -  if (!Loader().AllowPlugins())
18 |      return nullptr;
19 | -  return GetPage()->GetPluginData();
20 |  }
21 |  
22 |  void LocalFrame::SetAdTrackerForTesting(AdTracker* ad_tracker) {
23 | --
24 | 2.25.1
25 | 


--------------------------------------------------------------------------------
/build/patches/Disable-references-to-fonts.googleapis.com.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 15 Oct 2017 21:45:46 +0200
 3 | Subject: Disable references to fonts.googleapis.com
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../content/browser/dom_distiller_viewer_source.cc             | 2 +-
 8 |  components/dom_distiller/core/html/preview.html                | 2 +-
 9 |  .../dom_distiller/core/javascript/dom_distiller_viewer.js      | 2 +-
10 |  third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css | 3 +--
11 |  4 files changed, 4 insertions(+), 5 deletions(-)
12 | 
13 | diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
14 | --- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
15 | +++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
16 | @@ -299,7 +299,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
17 |  std::string DomDistillerViewerSource::GetContentSecurityPolicy(
18 |      network::mojom::CSPDirectiveName directive) {
19 |    if (directive == network::mojom::CSPDirectiveName::StyleSrc) {
20 | -    return "style-src 'self' https://fonts.googleapis.com;";
21 | +    return "style-src 'self';";
22 |    } else if (directive == network::mojom::CSPDirectiveName::ChildSrc) {
23 |      return "child-src *;";
24 |    } else if (directive ==
25 | diff --git a/components/dom_distiller/core/html/preview.html b/components/dom_distiller/core/html/preview.html
26 | --- a/components/dom_distiller/core/html/preview.html
27 | +++ b/components/dom_distiller/core/html/preview.html
28 | @@ -11,7 +11,7 @@ found in the LICENSE file.
29 |    <meta name="theme-color" id="theme-color">
30 |    <title>Title goes here and it could be kind of lengthy - Publisher name</title>
31 |    <link href="../css/distilledpage.css" rel="stylesheet" type="text/css">
32 | -  <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
33 | +  <link href='chrome://resources/css/roboto.css' rel='stylesheet' type='text/css'>
34 |    <style>
35 |      .english :lang(th) {display: none}
36 |      .english :lang(zh) {display: none}
37 | diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
38 | --- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
39 | +++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
40 | @@ -109,7 +109,7 @@ function maybeSetWebFont() {
41 |    }
42 |  
43 |    const e = document.createElement('link');
44 | -  e.href = 'https://fonts.googleapis.com/css?family=Roboto';
45 | +  e.href = 'chrome://resources/css/roboto.css';
46 |    e.rel = 'stylesheet';
47 |    e.type = 'text/css';
48 |    document.head.appendChild(e);
49 | diff --git a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css b/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
50 | --- a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
51 | +++ b/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css
52 | @@ -12,8 +12,7 @@
53 |   * See the License for the specific language governing permissions and
54 |   * limitations under the License. */
55 |  
56 | -@import "https://fonts.googleapis.com/css?family=Open+Sans:300,400,700&subset=latin,cyrillic-ext,greek-ext,cyrillic,greek,vietnamese,latin-ext";
57 | -@import "https://fonts.googleapis.com/css?family=Source+Code+Pro";
58 | +@import "chrome://resources/css/roboto.css";
59 |  
60 |  body,
61 |  table,
62 | --
63 | 2.25.1
64 | 


--------------------------------------------------------------------------------
/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 27 Oct 2019 10:21:19 +0100
 3 | Subject: Disable requests for single-word Omnibar searches
 4 | 
 5 | Patch from https://github.com/Eloston/ungoogled-chromium/issues/814#issuecomment-526873727
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../ui/omnibox/chrome_omnibox_navigation_observer.cc       | 7 -------
10 |  1 file changed, 7 deletions(-)
11 | 
12 | diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
13 | --- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
14 | +++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
15 | @@ -251,13 +251,6 @@ ChromeOmniboxNavigationObserver::ChromeOmniboxNavigationObserver(
16 |        profile_(profile),
17 |        show_infobar_(std::move(show_infobar)) {
18 |    NavigationUserData::CreateForNavigationHandle(navigation, this);
19 | -  if (alternative_nav_match_.destination_url.is_valid()) {
20 | -    loader_ = std::make_unique<AlternativeNavigationURLLoader>(
21 | -        alternative_nav_match.destination_url, this,
22 | -        base::BindOnce(
23 | -            &ChromeOmniboxNavigationObserver::OnAlternativeLoaderDone, this),
24 | -        GetURLLoaderFactory(loader_factory, profile));
25 | -  }
26 |  }
27 |  
28 |  ChromeOmniboxNavigationObserver::~ChromeOmniboxNavigationObserver() {
29 | --
30 | 2.25.1
31 | 


--------------------------------------------------------------------------------
/build/patches/Disable-some-signed-exchange-features.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 2 Nov 2019 16:22:56 +0100
 3 | Subject: Disable some signed exchange features
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  content/public/common/content_features.cc | 8 ++++----
 8 |  1 file changed, 4 insertions(+), 4 deletions(-)
 9 | 
10 | diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
11 | --- a/content/public/common/content_features.cc
12 | +++ b/content/public/common/content_features.cc
13 | @@ -999,14 +999,14 @@ BASE_FEATURE(kSharedArrayBufferOnDesktop,
14 |  // Signed Exchange Reporting for distributors
15 |  // https://www.chromestatus.com/feature/5687904902840320
16 |  BASE_FEATURE(kSignedExchangeReportingForDistributors,
17 | -             "SignedExchangeReportingForDistributors",
18 | -             base::FEATURE_ENABLED_BY_DEFAULT);
19 | +             "SignedExchangeReportingForDistributors",    // must be disabled
20 | +             base::FEATURE_DISABLED_BY_DEFAULT);          // in Bromite
21 |  
22 |  // Origin-Signed HTTP Exchanges (for WebPackage Loading)
23 |  // https://www.chromestatus.com/feature/5745285984681984
24 |  BASE_FEATURE(kSignedHTTPExchange,
25 | -             "SignedHTTPExchange",
26 | -             base::FEATURE_ENABLED_BY_DEFAULT);
27 | +             "SignedHTTPExchange",                        // must be disabled
28 | +             base::FEATURE_DISABLED_BY_DEFAULT);          // in Bromite
29 |  
30 |  // Delays RenderProcessHost shutdown by a few seconds to allow the subframe's
31 |  // process to be potentially reused. This aims to reduce process churn in
32 | --
33 | 2.25.1
34 | 


--------------------------------------------------------------------------------
/build/patches/Disable-the-DIAL-repeating-discovery.patch:
--------------------------------------------------------------------------------
 1 | From: Blaise <BlaiseD@GMail.com>
 2 | Date: Sun, 23 Aug 2020 14:32:55 -0500
 3 | Subject: Disable the DIAL repeating discovery
 4 | 
 5 | This causes unnecessary SSDP network spam
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/media/router/discovery/dial/dial_registry.cc | 6 ------
10 |  1 file changed, 6 deletions(-)
11 | 
12 | diff --git a/chrome/browser/media/router/discovery/dial/dial_registry.cc b/chrome/browser/media/router/discovery/dial/dial_registry.cc
13 | --- a/chrome/browser/media/router/discovery/dial/dial_registry.cc
14 | +++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc
15 | @@ -154,10 +154,6 @@ void DialRegistry::StartPeriodicDiscovery() {
16 |      return;
17 |  
18 |    dial_ = CreateDialService();
19 | -  DoDiscovery();
20 | -  repeating_timer_ = std::make_unique<base::RepeatingTimer>();
21 | -  repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this,
22 | -                          &DialRegistry::DoDiscovery);
23 |    // Always send the current device list with the next discovery request.  This
24 |    // may not be necessary, but is done to match previous behavior.
25 |    ++registry_generation_;
26 | @@ -174,8 +170,6 @@ void DialRegistry::StopPeriodicDiscovery() {
27 |    if (!dial_)
28 |      return;
29 |  
30 | -  repeating_timer_->Stop();
31 | -  repeating_timer_.reset();
32 |    ClearDialService();
33 |  }
34 |  
35 | --
36 | 2.25.1
37 | 


--------------------------------------------------------------------------------
/build/patches/Disable-update-scheduler.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 27 Oct 2018 17:54:01 +0200
 3 | Subject: Disable update scheduler
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../components/component_updater/UpdateScheduler.java         | 4 +---
 8 |  1 file changed, 1 insertion(+), 3 deletions(-)
 9 | 
10 | diff --git a/components/component_updater/android/java/src/org/chromium/components/component_updater/UpdateScheduler.java b/components/component_updater/android/java/src/org/chromium/components/component_updater/UpdateScheduler.java
11 | --- a/components/component_updater/android/java/src/org/chromium/components/component_updater/UpdateScheduler.java
12 | +++ b/components/component_updater/android/java/src/org/chromium/components/component_updater/UpdateScheduler.java
13 | @@ -33,9 +33,7 @@ public class UpdateScheduler {
14 |  
15 |      @CalledByNative
16 |      /* package */ static boolean isAvailable() {
17 | -        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
18 | -                || ChromiumPlayServicesAvailability.isGooglePlayServicesAvailable(
19 | -                        ContextUtils.getApplicationContext());
20 | +        return false;
21 |      }
22 |  
23 |      /* package */ void onStartTaskBeforeNativeLoaded(TaskFinishedCallback callback) {
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Do-not-build-API-keys-infobar.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 23 Jul 2021 15:05:19 +0200
 3 | Subject: Do not build API keys infobar
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/browser/ui/BUILD.gn | 2 --
 8 |  1 file changed, 2 deletions(-)
 9 | 
10 | diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
11 | --- a/chrome/browser/ui/BUILD.gn
12 | +++ b/chrome/browser/ui/BUILD.gn
13 | @@ -1304,8 +1304,6 @@ static_library("ui") {
14 |        "singleton_tabs.h",
15 |        "startup/automation_infobar_delegate.cc",
16 |        "startup/automation_infobar_delegate.h",
17 | -      "startup/google_api_keys_infobar_delegate.cc",
18 | -      "startup/google_api_keys_infobar_delegate.h",
19 |        "startup/infobar_utils.cc",
20 |        "startup/infobar_utils.h",
21 |        "startup/launch_mode_recorder.cc",
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Do-not-hide-component-extensions.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 12 Oct 2017 08:09:24 +0200
 3 | Subject: Do not hide component extensions
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  extensions/common/extension.cc | 5 ++---
 8 |  1 file changed, 2 insertions(+), 3 deletions(-)
 9 | 
10 | diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
11 | --- a/extensions/common/extension.cc
12 | +++ b/extensions/common/extension.cc
13 | @@ -465,9 +465,8 @@ bool Extension::ShouldDisplayInNewTabPage() const {
14 |  }
15 |  
16 |  bool Extension::ShouldExposeViaManagementAPI() const {
17 | -  // Hide component extensions because they are only extensions as an
18 | -  // implementation detail of Chrome.
19 | -  return !extensions::Manifest::IsComponentLocation(location());
20 | +  // do not hide component extensions
21 | +  return true;
22 |  }
23 |  
24 |  Extension::ManifestData* Extension::GetManifestData(const std::string& key)
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/Do-not-ignore-download-location-prompt-setting.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 20 Jan 2019 06:20:10 +0100
 3 | Subject: Do not ignore download location prompt setting
 4 | 
 5 | Upstream has decided that it works as intended (https://bugs.chromium.org/p/chromium/issues/detail?id=916606)
 6 | but users would like to decide where to save a file even when there is no SD card available;
 7 | do not skip the prompt in such cases.
 8 | 
 9 | Do not tick "Don't show again" by default
10 | 
11 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
12 | ---
13 |  .../DownloadLocationDialogCoordinator.java        | 15 ---------------
14 |  1 file changed, 15 deletions(-)
15 | 
16 | diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
17 | --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
18 | +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
19 | @@ -131,21 +131,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
20 |       * @param dirs An list of available download directories.
21 |       */
22 |      private void onDirectoryOptionsRetrieved(ArrayList<DirectoryOption> dirs) {
23 | -        // If there is only one directory available, don't show the default dialog, and set the
24 | -        // download directory to default. Dialog will still show for other types of dialogs, like
25 | -        // name conflict or disk error or if Incognito download warning is needed.
26 | -        if (dirs.size() == 1 && !mLocationDialogManaged
27 | -                && mDialogType == DownloadLocationDialogType.DEFAULT
28 | -                && !shouldShowIncognitoWarning()) {
29 | -            final DirectoryOption dir = dirs.get(0);
30 | -            if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) {
31 | -                assert (!TextUtils.isEmpty(dir.location));
32 | -                DownloadDialogBridge.setDownloadAndSaveFileDefaultDirectory(dir.location);
33 | -                mController.onDownloadLocationDialogComplete(mSuggestedPath);
34 | -            }
35 | -            return;
36 | -        }
37 | -
38 |          // Already showing the dialog.
39 |          if (mDialogModel != null) return;
40 |  
41 | --
42 | 2.25.1
43 | 


--------------------------------------------------------------------------------
/build/patches/Do-not-link-with-libatomic.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Tue, 11 Jan 2022 13:59:32 +0000
 3 | Subject: Do not link with libatomic
 4 | 
 5 | Compiler has built-in support thus libatomic linking is no more needed
 6 | This patch allows building with use_sysroot=false
 7 | 
 8 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  base/BUILD.gn | 2 +-
12 |  1 file changed, 1 insertion(+), 1 deletion(-)
13 | 
14 | diff --git a/base/BUILD.gn b/base/BUILD.gn
15 | --- a/base/BUILD.gn
16 | +++ b/base/BUILD.gn
17 | @@ -1561,7 +1561,7 @@ mixed_component("base") {
18 |    # more robust check for this.
19 |    if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) &&
20 |        host_toolchain != "//build/toolchain/cros:host") {
21 | -    libs += [ "atomic" ]
22 | +    #libs += [ "atomic" ]
23 |    }
24 |  
25 |    if (use_allocator_shim) {
26 | --
27 | 2.25.1
28 | 


--------------------------------------------------------------------------------
/build/patches/Do-not-store-passwords-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 11 Oct 2017 23:17:17 +0200
 3 | Subject: Do not store passwords by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/password_manager/core/browser/password_manager.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
11 | --- a/components/password_manager/core/browser/password_manager.cc
12 | +++ b/components/password_manager/core/browser/password_manager.cc
13 | @@ -228,14 +228,14 @@ bool IsSingleUsernameSubmission(const PasswordForm& submitted_form) {
14 |  void PasswordManager::RegisterProfilePrefs(
15 |      user_prefs::PrefRegistrySyncable* registry) {
16 |    registry->RegisterBooleanPref(
17 | -      prefs::kCredentialsEnableService, true,
18 | +      prefs::kCredentialsEnableService, false,
19 |        user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
20 |  #if BUILDFLAG(IS_IOS)
21 |    registry->RegisterBooleanPref(prefs::kCredentialProviderEnabledOnStartup,
22 |                                  false);
23 |  #endif
24 |    registry->RegisterBooleanPref(
25 | -      prefs::kCredentialsEnableAutosignin, true,
26 | +      prefs::kCredentialsEnableAutosignin, false,
27 |        user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
28 |    registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(),
29 |                                 PrefRegistry::NO_REGISTRATION_FLAGS);
30 | --
31 | 2.25.1
32 | 


--------------------------------------------------------------------------------
/build/patches/Enable-ECH-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 30 Oct 2022 18:11:19 +0100
 3 | Subject: Enable ECH by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  net/base/features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/net/base/features.cc b/net/base/features.cc
11 | --- a/net/base/features.cc
12 | +++ b/net/base/features.cc
13 | @@ -76,8 +76,8 @@ BASE_FEATURE(kEnableTLS13EarlyData,
14 |               base::FEATURE_DISABLED_BY_DEFAULT);
15 |  
16 |  BASE_FEATURE(kEncryptedClientHello,
17 | -             "EncryptedClientHello",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "EncryptedClientHello",                 // enabled
20 | +             base::FEATURE_ENABLED_BY_DEFAULT);      // in Bromite
21 |  
22 |  BASE_FEATURE(kNetworkQualityEstimator,
23 |               "NetworkQualityEstimator",
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Enable-HEVC-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Tue, 27 Sep 2022 23:39:54 +0200
 3 | Subject: Enable HEVC by default
 4 | 
 5 | Add a guard to avoid setting to be disabled upstream.
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  media/base/media_switches.cc | 4 ++--
10 |  1 file changed, 2 insertions(+), 2 deletions(-)
11 | 
12 | diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
13 | --- a/media/base/media_switches.cc
14 | +++ b/media/base/media_switches.cc
15 | @@ -289,8 +289,8 @@ BASE_FEATURE(kPictureInPicture,
16 |  #if BUILDFLAG(ENABLE_PLATFORM_HEVC)
17 |  // Enables HEVC hardware accelerated decoding.
18 |  BASE_FEATURE(kPlatformHEVCDecoderSupport,
19 | -             "PlatformHEVCDecoderSupport",
20 | -             base::FEATURE_ENABLED_BY_DEFAULT);
21 | +             "PlatformHEVCDecoderSupport",         // must be enabled
22 | +             base::FEATURE_ENABLED_BY_DEFAULT);    // in Bromite
23 |  #endif  // BUILDFLAG(ENABLE_PLATFORM_HEVC)
24 |  
25 |  // Only decode preload=metadata elements upon visibility.
26 | --
27 | 2.25.1
28 | 


--------------------------------------------------------------------------------
/build/patches/Enable-PermuteTLSExtensions-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 2 Dec 2022 01:18:14 +0100
 3 | Subject: Enable PermuteTLSExtensions by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  net/base/features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/net/base/features.cc b/net/base/features.cc
11 | --- a/net/base/features.cc
12 | +++ b/net/base/features.cc
13 | @@ -154,8 +154,8 @@ BASE_FEATURE(kTLS13KeyUpdate,
14 |               base::FEATURE_DISABLED_BY_DEFAULT);
15 |  
16 |  BASE_FEATURE(kPermuteTLSExtensions,
17 | -             "PermuteTLSExtensions",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "PermuteTLSExtensions",               // enabled by default
20 | +             base::FEATURE_ENABLED_BY_DEFAULT);    // in Bromite
21 |  
22 |  BASE_FEATURE(kPostQuantumCECPQ2,
23 |               "PostQuantumCECPQ2",
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Enable-SPPI-for-devices-with-enough-memory.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 17 Mar 2019 19:09:00 +0100
 3 | Subject: Enable SPPI for devices with enough memory
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/common/chrome_features.cc      | 8 ++------
 8 |  components/site_isolation/features.cc | 4 ++--
 9 |  2 files changed, 4 insertions(+), 8 deletions(-)
10 | 
11 | diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
12 | --- a/chrome/common/chrome_features.cc
13 | +++ b/chrome/common/chrome_features.cc
14 | @@ -1045,12 +1045,8 @@ BASE_FEATURE(kSecurityKeyAttestationPrompt,
15 |  // TODO(alexmos): Move this and the other site isolation features below to
16 |  // browser_features, as they are only used on the browser side.
17 |  BASE_FEATURE(kSitePerProcess,
18 | -             "SitePerProcess",
19 | -#if BUILDFLAG(IS_ANDROID)
20 | -             base::FEATURE_DISABLED_BY_DEFAULT
21 | -#else
22 | -             base::FEATURE_ENABLED_BY_DEFAULT
23 | -#endif
24 | +             "SitePerProcess",                  // enabled by default
25 | +             base::FEATURE_ENABLED_BY_DEFAULT   // in Bromite
26 |  );
27 |  
28 |  #if BUILDFLAG(IS_CHROMEOS_ASH)
29 | diff --git a/components/site_isolation/features.cc b/components/site_isolation/features.cc
30 | --- a/components/site_isolation/features.cc
31 | +++ b/components/site_isolation/features.cc
32 | @@ -64,8 +64,8 @@ BASE_FEATURE(kSiteIsolationForOAuthSites,
33 |  // kSitePerProcess won't be checked at all, and field trials won't activate
34 |  // either the control or the experiment group.
35 |  BASE_FEATURE(kSiteIsolationMemoryThresholds,
36 | -             "SiteIsolationMemoryThresholds",
37 | -             base::FEATURE_DISABLED_BY_DEFAULT);
38 | +             "SiteIsolationMemoryThresholds",     // must be enabled
39 | +             base::FEATURE_ENABLED_BY_DEFAULT);   // in Bromite
40 |  const char kStrictSiteIsolationMemoryThresholdParamName[] =
41 |      "strict_site_isolation_threshold_mb";
42 |  const char kPartialSiteIsolationMemoryThresholdParamName[] =
43 | --
44 | 2.25.1
45 | 


--------------------------------------------------------------------------------
/build/patches/Enable-darken-websites-checkbox-in-themes.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 20 Aug 2020 20:15:34 +0200
 3 | Subject: Enable darken websites checkbox in themes
 4 | 
 5 | Unexpire #darken-websites-checkbox-in-themes-setting
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/flag-metadata.json                   | 6 +++---
10 |  components/content_settings/core/common/features.cc | 4 ++--
11 |  2 files changed, 5 insertions(+), 5 deletions(-)
12 | 
13 | diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
14 | --- a/chrome/browser/flag-metadata.json
15 | +++ b/chrome/browser/flag-metadata.json
16 | @@ -1256,9 +1256,9 @@
17 |      "expiry_milestone": 114
18 |    },
19 |    {
20 | -    "name": "darken-websites-checkbox-in-themes-setting",
21 | -    "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington" ],
22 | -    "expiry_milestone": 110
23 | +    "name": "darken-websites-checkbox-in-themes-setting",                  // this is always enabled in Bromite
24 | +    "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington" ], // -
25 | +    "expiry_milestone": -1
26 |    },
27 |    {
28 |      "name": "dcheck-is-fatal",
29 | diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc
30 | --- a/components/content_settings/core/common/features.cc
31 | +++ b/components/content_settings/core/common/features.cc
32 | @@ -19,8 +19,8 @@ BASE_FEATURE(kImprovedCookieControls,
33 |  // Enables auto dark feature in theme settings.
34 |  #if BUILDFLAG(IS_ANDROID)
35 |  BASE_FEATURE(kDarkenWebsitesCheckboxInThemesSetting,
36 | -             "DarkenWebsitesCheckboxInThemesSetting",
37 | -             base::FEATURE_DISABLED_BY_DEFAULT);
38 | +             "DarkenWebsitesCheckboxInThemesSetting",     // must be enabled
39 | +             base::FEATURE_ENABLED_BY_DEFAULT);           // in Bromite
40 |  constexpr base::FeatureParam<bool> kDarkenWebsitesCheckboxOptOut{
41 |      &kDarkenWebsitesCheckboxInThemesSetting, "opt_out", true};
42 |  #endif  // BUILDFLAG(IS_ANDROID)
43 | --
44 | 2.25.1
45 | 


--------------------------------------------------------------------------------
/build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Thu, 22 Dec 2016 07:15:34 -0500
 3 | Subject: Enable -fwrapv in Clang for non-UBSan builds
 4 | 
 5 | Using -fwrapv (notably only when not using signed integer overflow checking -
 6 | since it will override it and result in not performing checks) is just common
 7 | sense since it eliminates the chance of security vulnerabilities being
 8 | introduced by optimizations based on signed overflow being undefined.
 9 | That has happened before, and those optimizations don't even add up to a 0.1%
10 | performance increase for this kind of software. It's not worth having.
11 | The Linux kernel passes -fwrapv and also -fno-strict-aliasing to disable those
12 | dangerous optimizations (since there is so much incorrect code they can break).
13 | In fact, it is easy to point to dozens of known examples of invalid code that
14 | could potentially be broken by those optimizations.
15 | 
16 | It is not acceptable for projects to be using optimizations that are known to
17 | be broken with a bunch of code in their tree.
18 | They put barely any effort into even fixing the known cases.
19 | Chromium has blacklists for UBSan for 'false positives' (none of which are
20 | actually false positives, but rather "undefined, but not a bug beyond
21 | potentially being broken by optimizations or even code generation without
22 | them") and also for components too full of these bugs for them to currently
23 | want to bother with it. That includes a bunch of signed overflow issues
24 | (there is sadly no detection for aliasing violations, which are fairly common,
25 | but not that common).
26 | 
27 | Ideally, -fwrapv could be always passed, but unfortunately the way it is
28 | implemented has silly interactions with other switches.
29 | The reason it would still make sense to pass it is because due to their UBSan
30 | blacklists, they get far from full coverage with it, so -fwrapv would still
31 | be better than nothing where it's not being used.
32 | 
33 | Since -fwrapv makes signed integer overflow well-defined, Clang will disable
34 | the UBSan checks for signed integer overflow, including in the
35 | production-oriented trapping mode used for hardening.
36 | 
37 | Excerpt from https://github.com/bromite/bromite/issues/226
38 | 
39 | Original License: MIT - https://spdx.org/licenses/MIT.html
40 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
41 | ---
42 |  build/config/compiler/BUILD.gn | 4 ++++
43 |  1 file changed, 4 insertions(+)
44 | 
45 | diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
46 | --- a/build/config/compiler/BUILD.gn
47 | +++ b/build/config/compiler/BUILD.gn
48 | @@ -330,6 +330,10 @@ config("compiler") {
49 |        }
50 |      }
51 |  
52 | +    if (is_clang && !is_ubsan && !is_ubsan_security) {
53 | +      cflags += [ "-fwrapv" ]
54 | +    }
55 | +
56 |      # Linker warnings.
57 |      if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
58 |          current_os != "zos") {
59 | --
60 | 2.25.1
61 | 


--------------------------------------------------------------------------------
/build/patches/Enable-network-isolation-features.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Thu, 10 Dec 2020 21:52:35 +0100
 3 | Subject: Enable network isolation features
 4 | 
 5 | Enable SplitCacheByNetworkIsolationKey, kSplitHostCacheByNetworkIsolationKey,
 6 | kPartitionConnectionsByNetworkIsolationKey, kPartitionHttpServerPropertiesByNetworkIsolationKey,
 7 | kPartitionSSLSessionsByNetworkIsolationKey, PartitionExpectCTStateByNetworkIsolationKey,
 8 | PartitionNelAndReportingByNetworkIsolationKey
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  net/base/features.cc | 32 ++++++++++++++++----------------
13 |  1 file changed, 16 insertions(+), 16 deletions(-)
14 | 
15 | diff --git a/net/base/features.cc b/net/base/features.cc
16 | --- a/net/base/features.cc
17 | +++ b/net/base/features.cc
18 | @@ -82,36 +82,36 @@ BASE_FEATURE(kSplitCacheByIncludeCredentials,
19 |               base::FEATURE_DISABLED_BY_DEFAULT);
20 |  
21 |  BASE_FEATURE(kSplitCacheByNetworkIsolationKey,
22 | -             "SplitCacheByNetworkIsolationKey",
23 | -             base::FEATURE_DISABLED_BY_DEFAULT);
24 | +             "SplitCacheByNetworkIsolationKey",            // must be enabled
25 | +             base::FEATURE_ENABLED_BY_DEFAULT);            // in Bromite
26 |  
27 | -BASE_FEATURE(kSplitHostCacheByNetworkIsolationKey,
28 | -             "SplitHostCacheByNetworkIsolationKey",
29 | -             base::FEATURE_DISABLED_BY_DEFAULT);
30 | +BASE_FEATURE(kSplitHostCacheByNetworkIsolationKey,         // must be enabled
31 | +             "SplitHostCacheByNetworkIsolationKey",        // in Bromite
32 | +             base::FEATURE_ENABLED_BY_DEFAULT);
33 |  
34 |  BASE_FEATURE(kPartitionConnectionsByNetworkIsolationKey,
35 | -             "PartitionConnectionsByNetworkIsolationKey",
36 | -             base::FEATURE_DISABLED_BY_DEFAULT);
37 | +             "PartitionConnectionsByNetworkIsolationKey",  // must be enabled
38 | +             base::FEATURE_ENABLED_BY_DEFAULT);            // in Bromite
39 |  
40 |  BASE_FEATURE(kForceIsolationInfoFrameOriginToTopLevelFrame,
41 |               "ForceIsolationInfoFrameOriginToTopLevelFrame",
42 |               base::FEATURE_DISABLED_BY_DEFAULT);
43 |  
44 | -BASE_FEATURE(kPartitionHttpServerPropertiesByNetworkIsolationKey,
45 | -             "PartitionHttpServerPropertiesByNetworkIsolationKey",
46 | -             base::FEATURE_DISABLED_BY_DEFAULT);
47 | +BASE_FEATURE(kPartitionHttpServerPropertiesByNetworkIsolationKey,     // must be enabled
48 | +             "PartitionHttpServerPropertiesByNetworkIsolationKey",    // in Bromite
49 | +             base::FEATURE_ENABLED_BY_DEFAULT);
50 |  
51 |  BASE_FEATURE(kPartitionSSLSessionsByNetworkIsolationKey,
52 | -             "PartitionSSLSessionsByNetworkIsolationKey",
53 | -             base::FEATURE_DISABLED_BY_DEFAULT);
54 | +             "PartitionSSLSessionsByNetworkIsolationKey",             // must be enabled
55 | +             base::FEATURE_ENABLED_BY_DEFAULT);                       // in Bromite
56 |  
57 |  BASE_FEATURE(kPartitionExpectCTStateByNetworkIsolationKey,
58 | -             "PartitionExpectCTStateByNetworkIsolationKey",
59 | -             base::FEATURE_DISABLED_BY_DEFAULT);
60 | +             "PartitionExpectCTStateByNetworkIsolationKey",           // must be enabled
61 | +             base::FEATURE_ENABLED_BY_DEFAULT);                       // in Bromite
62 |  
63 |  BASE_FEATURE(kPartitionNelAndReportingByNetworkIsolationKey,
64 | -             "PartitionNelAndReportingByNetworkIsolationKey",
65 | -             base::FEATURE_DISABLED_BY_DEFAULT);
66 | +             "PartitionNelAndReportingByNetworkIsolationKey",         // must be enabled
67 | +             base::FEATURE_ENABLED_BY_DEFAULT);                       // in Bromite
68 |  
69 |  BASE_FEATURE(kEnableDoubleKeyNetworkAnonymizationKey,
70 |               "EnableDoubleKeyNetworkAnonymizationKey",
71 | --
72 | 2.25.1
73 | 


--------------------------------------------------------------------------------
/build/patches/Enable-prefetch-privacy-changes-by-default.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 31 Jul 2020 08:27:26 +0200
 3 | Subject: Enable prefetch-privacy-changes by default
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  third_party/blink/common/features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
11 | --- a/third_party/blink/common/features.cc
12 | +++ b/third_party/blink/common/features.cc
13 | @@ -509,8 +509,8 @@ BASE_FEATURE(kAllowSyncXHRInPageDismissal,
14 |  // Prefetch request properties are updated to be privacy-preserving. See
15 |  // crbug.com/988956.
16 |  BASE_FEATURE(kPrefetchPrivacyChanges,
17 | -             "PrefetchPrivacyChanges",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "PrefetchPrivacyChanges",            // must be enabled
20 | +             base::FEATURE_ENABLED_BY_DEFAULT);   // in Bromite
21 |  
22 |  // Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
23 |  // format in the image decode cache. See crbug.com/919627 for details on the
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Enable-third-party-storage-partitioning.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 3 Dec 2022 12:02:20 +0100
 3 | Subject: Enable third-party storage partitioning
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  net/base/features.cc | 4 ++--
 8 |  1 file changed, 2 insertions(+), 2 deletions(-)
 9 | 
10 | diff --git a/net/base/features.cc b/net/base/features.cc
11 | --- a/net/base/features.cc
12 | +++ b/net/base/features.cc
13 | @@ -362,8 +362,8 @@ const base::FeatureParam<bool> kStorageAccessAPIAutoDenyOutsideFPS{
14 |  // Enables partitioning of third party storage (IndexedDB, CacheStorage, etc.)
15 |  // by the top level site to reduce fingerprinting.
16 |  BASE_FEATURE(kThirdPartyStoragePartitioning,
17 | -             "ThirdPartyStoragePartitioning",
18 | -             base::FEATURE_DISABLED_BY_DEFAULT);
19 | +             "ThirdPartyStoragePartitioning",       // must be enabled
20 | +             base::FEATURE_ENABLED_BY_DEFAULT);     // in Bromite
21 |  
22 |  BASE_FEATURE(kAlpsParsing, "AlpsParsing", base::FEATURE_ENABLED_BY_DEFAULT);
23 |  
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Follow-only-system-dark-mode.patch:
--------------------------------------------------------------------------------
 1 | From: krlvm <51774833+krlvm@users.noreply.github.com>
 2 | Date: Mon, 4 Jul 2022 16:14:37 +0300
 3 | Subject: Follow only system dark mode
 4 | 
 5 | Follow only system dark mode preference when theme is set to system default
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../browser/night_mode/GlobalNightModeStateController.java      | 2 +-
10 |  1 file changed, 1 insertion(+), 1 deletion(-)
11 | 
12 | diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
13 | --- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
14 | +++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java
15 | @@ -126,7 +126,7 @@ class GlobalNightModeStateController implements NightModeStateProvider,
16 |      }
17 |  
18 |      private void updateNightMode() {
19 | -        boolean powerSaveModeOn = mPowerSaveModeMonitor.powerSavingIsOn();
20 | +        boolean powerSaveModeOn = false;
21 |          final int theme = NightModeUtils.getThemeSetting();
22 |          final boolean newNightModeOn = theme == ThemeType.SYSTEM_DEFAULT
23 |                          && (powerSaveModeOn || mSystemNightModeMonitor.isSystemNightModeOn())
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/Hardening-against-incognito-mode-detection.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 5 Sep 2020 21:38:15 +0200
 3 | Subject: Hardening against incognito mode detection
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  storage/browser/quota/quota_settings.cc | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/storage/browser/quota/quota_settings.cc b/storage/browser/quota/quota_settings.cc
11 | --- a/storage/browser/quota/quota_settings.cc
12 | +++ b/storage/browser/quota/quota_settings.cc
13 | @@ -60,7 +60,7 @@ absl::optional<QuotaSettings> CalculateNominalDynamicSettings(
14 |    base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
15 |                                                  base::BlockingType::MAY_BLOCK);
16 |  
17 | -  if (is_incognito) {
18 | +  if ((false) && is_incognito) {
19 |      return CalculateIncognitoDynamicSettings(
20 |          device_info_helper->AmountOfPhysicalMemory());
21 |    }
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Ignore-enterprise-policies-for-secure-DNS.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Tue, 26 Jan 2021 00:21:51 +0100
 3 | Subject: Ignore enterprise policies for secure DNS
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../chrome/browser/enterprise/util/EnterpriseInfo.java    | 8 +-------
 8 |  1 file changed, 1 insertion(+), 7 deletions(-)
 9 | 
10 | diff --git a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
11 | --- a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
12 | +++ b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
13 | @@ -81,13 +81,7 @@ public abstract class EnterpriseInfo {
14 |      @CalledByNative
15 |      public static void getManagedStateForNative() {
16 |          Callback<OwnedState> callback = (result) -> {
17 | -            if (result == null) {
18 | -                // Unable to determine the owned state, assume it's not owned.
19 | -                EnterpriseInfoJni.get().updateNativeOwnedState(false, false);
20 | -            } else {
21 | -                EnterpriseInfoJni.get().updateNativeOwnedState(
22 | -                        result.mDeviceOwned, result.mProfileOwned);
23 | -            }
24 | +            EnterpriseInfoJni.get().updateNativeOwnedState(false, false);
25 |          };
26 |  
27 |          EnterpriseInfo.getInstance().getDeviceEnterpriseInfo(callback);
28 | --
29 | 2.25.1
30 | 


--------------------------------------------------------------------------------
/build/patches/Improve-plain-text-rendering-on-mobile.patch:
--------------------------------------------------------------------------------
 1 | From: mauve <ranger@mauve.moe>
 2 | Date: Mon, 30 May 2022 22:25:04 -0400
 3 | Subject: Improve plain text rendering on mobile
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../renderer/core/html/parser/text_document_parser.cc | 11 ++++++++++-
 8 |  1 file changed, 10 insertions(+), 1 deletion(-)
 9 | 
10 | diff --git a/third_party/blink/renderer/core/html/parser/text_document_parser.cc b/third_party/blink/renderer/core/html/parser/text_document_parser.cc
11 | --- a/third_party/blink/renderer/core/html/parser/text_document_parser.cc
12 | +++ b/third_party/blink/renderer/core/html/parser/text_document_parser.cc
13 | @@ -66,9 +66,18 @@ void TextDocumentParser::InsertFakePreElement() {
14 |    TreeBuilder()->ConstructTree(&fake_meta);
15 |    attributes.clear();
16 |  
17 | +  // Scale up text to look good on Mobile
18 | +  attributes.push_back(Attribute(html_names::kNameAttr, "viewport"));
19 | +  attributes.push_back(Attribute(html_names::kContentAttr,
20 | +    "width=device-width, initial-scale=1.0, maximum-scale=1.0"));
21 | +  AtomicHTMLToken viewport_meta(HTMLToken::kStartTag,
22 | +                            html_names::HTMLTag::kMeta, attributes);
23 | +  TreeBuilder()->ConstructTree(&viewport_meta);
24 | +  attributes.clear();
25 | +
26 |    // Wrap the actual contents of the text file in <pre>.
27 |    attributes.push_back(Attribute(
28 | -      html_names::kStyleAttr, "word-wrap: break-word; white-space: pre-wrap;"));
29 | +      html_names::kStyleAttr, "word-wrap: break-word; white-space: pre-wrap; font-family: system-ui;"));
30 |    AtomicHTMLToken fake_pre(HTMLToken::kStartTag, html_names::HTMLTag::kPre,
31 |                             attributes);
32 |    TreeBuilder()->ConstructTree(&fake_pre);
33 | --
34 | 2.25.1
35 | 


--------------------------------------------------------------------------------
/build/patches/Increase-number-of-autocomplete-matches-to-10.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 27 Oct 2019 10:18:39 +0100
 3 | Subject: Increase number of autocomplete matches to 10
 4 | 
 5 | Patch adapted from https://github.com/Eloston/ungoogled-chromium/issues/814#issuecomment-526874703
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  components/omnibox/browser/autocomplete_result.cc | 1 +
10 |  components/omnibox/browser/omnibox_field_trial.cc | 6 +++---
11 |  2 files changed, 4 insertions(+), 3 deletions(-)
12 | 
13 | diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc
14 | --- a/components/omnibox/browser/autocomplete_result.cc
15 | +++ b/components/omnibox/browser/autocomplete_result.cc
16 | @@ -78,6 +78,7 @@ constexpr size_t kMaxPedalMatchIndex = std::numeric_limits<size_t>::max();
17 |  // static
18 |  size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) {
19 |  #if BUILDFLAG(IS_ANDROID)
20 | +  // this needs to be double the value of default_max_matches_per_provider from components/omnibox/browser/omnibox_field_trial.cc
21 |    constexpr size_t kDefaultMaxAutocompleteMatches = 10;
22 |    constexpr size_t kDefaultMaxZeroSuggestMatches = 15;
23 |  #elif BUILDFLAG(IS_IOS)
24 | diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
25 | --- a/components/omnibox/browser/omnibox_field_trial.cc
26 | +++ b/components/omnibox/browser/omnibox_field_trial.cc
27 | @@ -323,9 +323,9 @@ void OmniboxFieldTrial::GetDemotionsByType(
28 |  
29 |  size_t OmniboxFieldTrial::GetProviderMaxMatches(
30 |      AutocompleteProvider::Type provider) {
31 | -  size_t default_max_matches_per_provider = 3;
32 | +  size_t default_max_matches_per_provider = 5; // was 3; this needs to be half the value of kDefaultMaxAutocompleteMatches from components/omnibox/browser/autocomplete_result.cc
33 |  
34 | -  std::string param_value = base::GetFieldTrialParamValueByFeature(
35 | +/*  std::string param_value = base::GetFieldTrialParamValueByFeature(
36 |        omnibox::kUIExperimentMaxAutocompleteMatches,
37 |        OmniboxFieldTrial::kUIMaxAutocompleteMatchesByProviderParam);
38 |  
39 | @@ -349,7 +349,7 @@ size_t OmniboxFieldTrial::GetProviderMaxMatches(
40 |        else if (k == provider)
41 |          return v;
42 |      }
43 | -  }
44 | +  }*/
45 |  
46 |    return default_max_matches_per_provider;
47 |  }
48 | --
49 | 2.25.1
50 | 


--------------------------------------------------------------------------------
/build/patches/Invalidate-components-public-key.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 10 Jun 2022 14:21:13 +0200
 3 | Subject: Invalidate components public key
 4 | 
 5 | This prevents usage of any signed component
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  .../component_updater/pki_metadata_component_installer.cc      | 3 ++-
10 |  1 file changed, 2 insertions(+), 1 deletion(-)
11 | 
12 | diff --git a/chrome/browser/component_updater/pki_metadata_component_installer.cc b/chrome/browser/component_updater/pki_metadata_component_installer.cc
13 | --- a/chrome/browser/component_updater/pki_metadata_component_installer.cc
14 | +++ b/chrome/browser/component_updater/pki_metadata_component_installer.cc
15 | @@ -71,7 +71,8 @@ const char kGoogleOperatorName[] = "Google";
16 |  // The extension id is: efniojlnjndmcbiieegkicadnoecjjef
17 |  const uint8_t kPKIMetadataPublicKeySHA256[32] = {
18 |      0x45, 0xd8, 0xe9, 0xbd, 0x9d, 0x3c, 0x21, 0x88, 0x44, 0x6a, 0x82,
19 | -    0x03, 0xde, 0x42, 0x99, 0x45, 0x66, 0x25, 0xfe, 0xb3, 0xd1, 0xf8,
20 | +    // this fingerprint is changed on purpose in Bromite
21 | +    0x01, 0x02, 0x03, 0x04, 0x05, 0x66, 0x25, 0xfe, 0xb3, 0xd1, 0xf8,
22 |      0x11, 0x65, 0xb4, 0x6f, 0xd3, 0x1b, 0x21, 0x89, 0xbe, 0x9c};
23 |  
24 |  const base::FilePath::CharType kCTConfigProtoFileName[] =
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/Keep-empty-tabs-between-sessions.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Wed, 27 Oct 2021 10:57:09 +0000
 3 | Subject: Keep empty tabs between sessions
 4 | 
 5 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  .../chrome/browser/tabmodel/TabPersistentStore.java       | 8 --------
 9 |  .../browser/tab/state/CriticalPersistedTabData.java       | 3 ---
10 |  2 files changed, 11 deletions(-)
11 | 
12 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
13 | --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
14 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
15 | @@ -816,14 +816,6 @@ public class TabPersistentStore {
16 |                  mTabsToMigrate.add(tab);
17 |              }
18 |          } else {
19 | -            if (UrlUtilities.isNTPUrl(tabToRestore.url) && !setAsActive
20 | -                    && !tabToRestore.fromMerge) {
21 | -                Log.i(TAG, "Skipping restore of non-selected NTP.");
22 | -                RecordHistogram.recordEnumeratedHistogram("Tabs.TabRestoreMethod",
23 | -                        TabRestoreMethod.SKIPPED_NTP, TabRestoreMethod.NUM_ENTRIES);
24 | -                return;
25 | -            }
26 | -
27 |              Log.w(TAG, "Failed to restore TabState; creating Tab with last known URL.");
28 |              Tab fallbackTab = mTabCreatorManager.getTabCreator(isIncognito)
29 |                                        .createNewTab(new LoadUrlParams(tabToRestore.url),
30 | diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
31 | --- a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
32 | +++ b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/CriticalPersistedTabData.java
33 | @@ -602,9 +602,6 @@ public class CriticalPersistedTabData extends PersistedTabData {
34 |          if (getUrl() == null || getUrl().isEmpty()) {
35 |              return false;
36 |          }
37 | -        if (UrlUtilities.isNTPUrl(getUrl()) && !mTab.canGoBack() && !mTab.canGoForward()) {
38 | -            return false;
39 | -        }
40 |          if (isTabUrlContentScheme(getUrl())) {
41 |              return false;
42 |          }
43 | --
44 | 2.25.1
45 | 


--------------------------------------------------------------------------------
/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 9 May 2020 08:33:15 +0200
 3 | Subject: Keep flag to allow screenshots in Incognito mode
 4 | 
 5 | See also:
 6 | * https://github.com/bromite/bromite/issues/551
 7 | * https://github.com/bromite/bromite/issues/1816
 8 | * https://bugs.chromium.org/p/chromium/issues/detail?id=920762
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  chrome/browser/flag-metadata.json | 6 +++---
13 |  1 file changed, 3 insertions(+), 3 deletions(-)
14 | 
15 | diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
16 | --- a/chrome/browser/flag-metadata.json
17 | +++ b/chrome/browser/flag-metadata.json
18 | @@ -4145,9 +4145,9 @@
19 |      "expiry_milestone": 110
20 |    },
21 |    {
22 | -    "name": "incognito-screenshot",
23 | -    "owners": [ "roagarwal", "sideyilmaz", "chrome-incognito@google.com" ],
24 | -    "expiry_milestone": 110
25 | +    "name": "incognito-screenshot",                                          // Bromite: guard this feature flag
26 | +    "owners": [ "roagarwal", "sideyilmaz", "chrome-incognito@google.com" ],  // -
27 | +    "expiry_milestone": -1                                                   // -
28 |    },
29 |    {
30 |      "name": "info-card-acknowledgement-tracking",
31 | --
32 | 2.25.1
33 | 


--------------------------------------------------------------------------------
/build/patches/Never-fetch-popular-sites.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Wed, 14 Feb 2018 12:56:01 +0100
 3 | Subject: Never fetch popular sites
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/ntp_tiles/popular_sites_impl.cc | 10 +++++++---
 8 |  1 file changed, 7 insertions(+), 3 deletions(-)
 9 | 
10 | diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
11 | --- a/components/ntp_tiles/popular_sites_impl.cc
12 | +++ b/components/ntp_tiles/popular_sites_impl.cc
13 | @@ -61,7 +61,6 @@ const char kPopularSitesDefaultDirectory[] = "chrome/ntp/";
14 |  const char kPopularSitesDefaultCountryCode[] = "DEFAULT";
15 |  const char kPopularSitesDefaultVersion[] = "5";
16 |  const int kSitesExplorationStartVersion = 6;
17 | -const int kPopularSitesRedownloadIntervalHours = 24;
18 |  
19 |  GURL GetPopularSitesURL(const std::string& directory,
20 |                          const std::string& country,
21 | @@ -285,7 +284,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
22 |    DCHECK(!callback_);
23 |    callback_ = std::move(callback);
24 |  
25 | -  const base::Time last_download_time = base::Time::FromInternalValue(
26 | +  if (force_download) {
27 | +    std::move(callback_).Run(true);
28 | +    return true;
29 | +  }
30 | +
31 | +/*  const base::Time last_download_time = base::Time::FromInternalValue(
32 |        prefs_->GetInt64(prefs::kPopularSitesLastDownloadPref));
33 |    const base::TimeDelta time_since_last_download =
34 |        base::Time::Now() - last_download_time;
35 | @@ -302,7 +306,7 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
36 |        (time_since_last_download > redownload_interval) || url_changed) {
37 |      FetchPopularSites();
38 |      return true;
39 | -  }
40 | +  }*/
41 |    return false;
42 |  }
43 |  
44 | --
45 | 2.25.1
46 | 


--------------------------------------------------------------------------------
/build/patches/Never-use-HTTP-probes-for-connection-detection.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 6 Nov 2021 09:46:24 +0100
 3 | Subject: Never use HTTP probes for connection detection
 4 | 
 5 | This patch disables the use of HTTP probes on Android < M devices
 6 | Connection will be always considered valid on such devices
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  .../browser/net/connectivitydetector/ConnectivityDetector.java | 3 ++-
11 |  1 file changed, 2 insertions(+), 1 deletion(-)
12 | 
13 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
14 | --- a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
15 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java
16 | @@ -180,7 +180,8 @@ public class ConnectivityDetector implements NetworkChangeNotifier.ConnectionTyp
17 |  
18 |          @Override
19 |          public boolean shouldSkipHttpProbes() {
20 | -            return false;
21 | +            // always assume that connection is valid on Android < M
22 | +            return true;
23 |          }
24 |      }
25 |  
26 | --
27 | 2.25.1
28 | 


--------------------------------------------------------------------------------
/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 28 Oct 2018 14:11:50 +0100
 3 | Subject: Offer builtin autocomplete for chrome://flags
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../browser/autocomplete/chrome_autocomplete_provider_client.cc | 2 ++
 8 |  1 file changed, 2 insertions(+)
 9 | 
10 | diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
11 | --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
12 | +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
13 | @@ -278,6 +278,8 @@ std::vector<std::u16string> ChromeAutocompleteProviderClient::GetBuiltinURLs() {
14 |  std::vector<std::u16string>
15 |  ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
16 |    std::vector<std::u16string> builtins_to_provide;
17 | +  builtins_to_provide.push_back(
18 | +      base::ASCIIToUTF16(chrome::kChromeUIFlagsURL));
19 |    builtins_to_provide.push_back(
20 |        base::ASCIIToUTF16(chrome::kChromeUIChromeURLsURL));
21 |  #if !BUILDFLAG(IS_ANDROID)
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/Re-introduce-override_build_timestamp.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 30 Dec 2018 09:26:12 +0100
 3 | Subject: Re-introduce override_build_timestamp
 4 | 
 5 | Revert "Remove override_build_date gn arg."
 6 | 
 7 | This reverts commit e335101eedd3ab28d16dcb4b22e5ee0b60044b89.
 8 | Use (overriden) build timestamp for chrome_version_id
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  base/BUILD.gn             | 7 ++++++-
13 |  build_overrides/build.gni | 5 +++++
14 |  2 files changed, 11 insertions(+), 1 deletion(-)
15 | 
16 | diff --git a/base/BUILD.gn b/base/BUILD.gn
17 | --- a/base/BUILD.gn
18 | +++ b/base/BUILD.gn
19 | @@ -4020,8 +4020,13 @@ action("build_date") {
20 |  
21 |    args = [
22 |      rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir),
23 | -    build_timestamp,
24 |    ]
25 | +
26 | +  if (override_build_timestamp != "N/A") {
27 | +    args += [ override_build_timestamp ]
28 | +  } else {
29 | +    args += [ build_timestamp ]
30 | +  }
31 |  }
32 |  
33 |  if (enable_nocompile_tests) {
34 | diff --git a/build_overrides/build.gni b/build_overrides/build.gni
35 | --- a/build_overrides/build.gni
36 | +++ b/build_overrides/build.gni
37 | @@ -34,6 +34,11 @@ declare_args() {
38 |    # //third_party/robolectric .
39 |    limit_android_deps = false
40 |  
41 | +  # Override this value to give a specific build date.
42 | +  # See //base/build_time.cc and //build/write_build_date_header.py for more
43 | +  # details; expected format is Unix Epoch time in seconds.
44 | +  override_build_timestamp = "N/A"
45 | +
46 |    # Allows googletest to pretty-print various absl types.  Disabled for nacl due
47 |    # to lack of toolchain support.
48 |    gtest_enable_absl_printers = !is_nacl
49 | --
50 | 2.25.1
51 | 


--------------------------------------------------------------------------------
/build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 28 Apr 2018 08:30:26 +0200
 3 | Subject: Reduce HTTP headers in DoH requests to bare minimum
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  net/base/load_flags_list.h              | 6 ++++++
 8 |  net/dns/dns_transaction.cc              | 2 +-
 9 |  net/url_request/url_request_http_job.cc | 8 ++++++--
10 |  3 files changed, 13 insertions(+), 3 deletions(-)
11 | 
12 | diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h
13 | --- a/net/base/load_flags_list.h
14 | +++ b/net/base/load_flags_list.h
15 | @@ -101,3 +101,9 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15)
16 |  // is considered privileged, and therefore this flag must only be set from a
17 |  // trusted process.
18 |  LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
19 | +// This load will not send Accept-Language or User-Agent headers, and not
20 | +// advertise brotli encoding.
21 | +// Used to comply with IETF (draft) DNS-over-HTTPS:
22 | +// "Implementors SHOULD NOT set non-essential HTTP headers in DoH client requests."
23 | +LOAD_FLAG(MINIMAL_HEADERS, 1 << 19)
24 | +
25 | diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
26 | --- a/net/dns/dns_transaction.cc
27 | +++ b/net/dns/dns_transaction.cc
28 | @@ -445,7 +445,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
29 |      // avoid deadlock and enable the use of preconfigured IP addresses.
30 |      request_->SetSecureDnsPolicy(SecureDnsPolicy::kBootstrap);
31 |      request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
32 | -                           LOAD_BYPASS_PROXY);
33 | +                           LOAD_MINIMAL_HEADERS | LOAD_BYPASS_PROXY);
34 |      request_->set_allow_credentials(false);
35 |      request_->set_isolation_info(isolation_info);
36 |    }
37 | diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
38 | --- a/net/url_request/url_request_http_job.cc
39 | +++ b/net/url_request/url_request_http_job.cc
40 | @@ -341,6 +341,7 @@ void URLRequestHttpJob::OnGotFirstPartySetCacheFilterMatchInfo(
41 |    // fields in the referrer.
42 |    GURL referrer(request_->referrer());
43 |  
44 | +  if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
45 |    // Our consumer should have made sure that this is a safe referrer (e.g. via
46 |    // URLRequestJob::ComputeReferrerForPolicy).
47 |    if (referrer.is_valid()) {
48 | @@ -348,11 +349,14 @@ void URLRequestHttpJob::OnGotFirstPartySetCacheFilterMatchInfo(
49 |      request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
50 |                                            referer_value);
51 |    }
52 | +  }
53 |  
54 | +  if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
55 |    request_info_.extra_headers.SetHeaderIfMissing(
56 |        HttpRequestHeaders::kUserAgent,
57 |        http_user_agent_settings_ ?
58 |            http_user_agent_settings_->GetUserAgent() : std::string());
59 | +  }
60 |  
61 |    AddExtraHeaders();
62 |  
63 | @@ -608,9 +612,9 @@ void URLRequestHttpJob::StartTransactionInternal() {
64 |  void URLRequestHttpJob::AddExtraHeaders() {
65 |    request_info_.extra_headers.SetAcceptEncodingIfMissing(
66 |        request()->url(), request()->accepted_stream_types(),
67 | -      request()->context()->enable_brotli());
68 | +      !(request_info_.load_flags & LOAD_MINIMAL_HEADERS) && request()->context()->enable_brotli());
69 |  
70 | -  if (http_user_agent_settings_) {
71 | +  if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS) && http_user_agent_settings_) {
72 |      // Only add default Accept-Language if the request didn't have it
73 |      // specified.
74 |      std::string accept_language =
75 | --
76 | 2.25.1
77 | 


--------------------------------------------------------------------------------
/build/patches/Reintroduce-override_build_timestamp.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 30 Dec 2018 09:26:12 +0100
 3 | Subject: Reintroduce override_build_timestamp
 4 | 
 5 | Revert "Remove override_build_date gn arg."
 6 | 
 7 | This reverts commit e335101eedd3ab28d16dcb4b22e5ee0b60044b89.
 8 | Use (overriden) build timestamp for chrome_version_id
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  base/BUILD.gn             | 7 ++++++-
13 |  build_overrides/build.gni | 5 +++++
14 |  2 files changed, 11 insertions(+), 1 deletion(-)
15 | 
16 | diff --git a/base/BUILD.gn b/base/BUILD.gn
17 | --- a/base/BUILD.gn
18 | +++ b/base/BUILD.gn
19 | @@ -4020,8 +4020,13 @@ action("build_date") {
20 |  
21 |    args = [
22 |      rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir),
23 | -    build_timestamp,
24 |    ]
25 | +
26 | +  if (override_build_timestamp != "N/A") {
27 | +    args += [ override_build_timestamp ]
28 | +  } else {
29 | +    args += [ build_timestamp ]
30 | +  }
31 |  }
32 |  
33 |  if (enable_nocompile_tests) {
34 | diff --git a/build_overrides/build.gni b/build_overrides/build.gni
35 | --- a/build_overrides/build.gni
36 | +++ b/build_overrides/build.gni
37 | @@ -34,6 +34,11 @@ declare_args() {
38 |    # //third_party/robolectric .
39 |    limit_android_deps = false
40 |  
41 | +  # Override this value to give a specific build date.
42 | +  # See //base/build_time.cc and //build/write_build_date_header.py for more
43 | +  # details; expected format is Unix Epoch time in seconds.
44 | +  override_build_timestamp = "N/A"
45 | +
46 |    # Allows googletest to pretty-print various absl types.  Disabled for nacl due
47 |    # to lack of toolchain support.
48 |    gtest_enable_absl_printers = !is_nacl
49 | --
50 | 2.25.1
51 | 


--------------------------------------------------------------------------------
/build/patches/Remove-EV-certificates.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Thu, 2 Apr 2015 12:44:23 +0200
 3 | Subject: Remove EV certificates
 4 | 
 5 | The team chose to let EV certificates appear just like normal
 6 | certificates. The web of trust is considered a failure in itself, so
 7 | do not give users a false sense of extra security with EV certs.
 8 | Instead, let them appear just like regular ones.
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  net/cert/ev_root_ca_metadata.cc | 19 ++++++++++++++++++-
13 |  net/cert/ev_root_ca_metadata.h  |  4 +---
14 |  2 files changed, 19 insertions(+), 4 deletions(-)
15 | 
16 | diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
17 | --- a/net/cert/ev_root_ca_metadata.cc
18 | +++ b/net/cert/ev_root_ca_metadata.cc
19 | @@ -40,7 +40,19 @@ struct EVMetadata {
20 |    const base::StringPiece policy_oids[kMaxOIDsPerCA];
21 |  };
22 |  
23 | -#include "net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc"
24 | +static const EVMetadata kEvRootCaMetadata[] = {
25 | +    // need some dummy data to make compiler happy, because
26 | +    // arraysize() is implemented as a convoluted template rather than
27 | +    // the traditional sizeof(x)/sizeof(*x)
28 | +    {
29 | +       {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
30 | +        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}},
31 | +        {
32 | +            "1.3.159.1.17.1",
33 | +            "",
34 | +        },
35 | +    }
36 | +};
37 |  
38 |  #endif  // defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
39 |  }  // namespace
40 | @@ -225,6 +237,11 @@ bool EVRootCAMetadata::RemoveEVCA(const SHA256HashValue& fingerprint) {
41 |  // metadata.
42 |  //
43 |  
44 | +bool EVRootCAMetadata::IsCaBrowserForumEvOid(PolicyOID policy_oid) {
45 | +  LOG(WARNING) << "Not implemented";
46 | +  return false;
47 | +}
48 | +
49 |  bool EVRootCAMetadata::IsEVPolicyOID(PolicyOID policy_oid) const {
50 |    LOG(WARNING) << "Not implemented";
51 |    return false;
52 | diff --git a/net/cert/ev_root_ca_metadata.h b/net/cert/ev_root_ca_metadata.h
53 | --- a/net/cert/ev_root_ca_metadata.h
54 | +++ b/net/cert/ev_root_ca_metadata.h
55 | @@ -20,7 +20,7 @@
56 |      BUILDFLAG(IS_FUCHSIA)
57 |  // When not defined, the EVRootCAMetadata singleton is a dumb placeholder
58 |  // implementation that will fail all EV lookup operations.
59 | -#define PLATFORM_USES_CHROMIUM_EV_METADATA
60 | +//#define PLATFORM_USES_CHROMIUM_EV_METADATA
61 |  #endif
62 |  
63 |  namespace base {
64 | @@ -65,12 +65,10 @@ class NET_EXPORT_PRIVATE EVRootCAMetadata {
65 |    bool HasEVPolicyOIDGivenBytes(const SHA256HashValue& fingerprint,
66 |                                  const der::Input& policy_oid) const;
67 |  
68 | -#if defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
69 |    // Returns true if |policy_oid| is for 2.23.140.1.1 (CA/Browser Forum's
70 |    // Extended Validation Policy). This is used as a hack by the
71 |    // platform-specific CertVerifyProcs when doing EV verification.
72 |    static bool IsCaBrowserForumEvOid(PolicyOID policy_oid);
73 | -#endif
74 |  
75 |    // AddEVCA adds an EV CA to the list of known EV CAs with the given policy.
76 |    // |policy| is expressed as a string of dotted numbers. It returns true on
77 | --
78 | 2.25.1
79 | 


--------------------------------------------------------------------------------
/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 21 Aug 2020 22:39:23 +0200
 3 | Subject: Remove blocklisted URLs upon bookmark creation
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../chromium/chrome/browser/app/ChromeActivity.java |  1 -
 8 |  .../chrome/browser/bookmarks/TabBookmarker.java     | 13 +++++++++++++
 9 |  2 files changed, 13 insertions(+), 1 deletion(-)
10 | 
11 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
12 | --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
13 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
14 | @@ -293,7 +293,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
15 |      private TabContentManager mTabContentManager;
16 |  
17 |      private UmaSessionStats mUmaSessionStats;
18 | -    private ContextReporter mContextReporter;
19 |  
20 |      private boolean mPartnerBrowserRefreshNeeded;
21 |  
22 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java
23 | --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java
24 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java
25 | @@ -20,6 +20,11 @@ import org.chromium.components.bookmarks.BookmarkItem;
26 |  import org.chromium.components.bookmarks.BookmarkType;
27 |  import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
28 |  
29 | +import org.chromium.chrome.browser.profiles.Profile;
30 | +import org.chromium.chrome.browser.suggestions.SuggestionsDependencyFactory;
31 | +import org.chromium.chrome.browser.suggestions.mostvisited.MostVisitedSites;
32 | +import org.chromium.url.GURL;
33 | +
34 |  /**
35 |   * Helper class for managing the UI flow for bookmarking the active tab and kicking off the backend.
36 |   * Shows a snackbar if a new bookmark was added. If the bookmark already exists, kicks off edit
37 | @@ -31,6 +36,7 @@ public class TabBookmarker {
38 |      private final Supplier<BottomSheetController> mBottomSheetControllerSupplier;
39 |      private final Supplier<SnackbarManager> mSnackbarManagerSupplier;
40 |      private final boolean mIsCustomTab;
41 | +    private MostVisitedSites mMostVisitedSites;
42 |  
43 |      /**
44 |       * Constructor.
45 | @@ -97,6 +103,13 @@ public class TabBookmarker {
46 |  
47 |          // Defense in depth against the UI being erroneously enabled.
48 |          BookmarkModel bridge = mBookmarkModelSupplier.get();
49 | +	// remove blocklisted URL from most visited sites
50 | +	if (mMostVisitedSites == null) {
51 | +            mMostVisitedSites =
52 | +                SuggestionsDependencyFactory.getInstance().createMostVisitedSites(Profile.getLastUsedRegularProfile());
53 | +        }
54 | +        mMostVisitedSites.removeBlocklistedUrl(tabToBookmark.getOriginalUrl());
55 | +
56 |          if (bridge == null || !bridge.isEditBookmarksEnabled()) {
57 |              assert false;
58 |              return;
59 | --
60 | 2.25.1
61 | 


--------------------------------------------------------------------------------
/build/patches/Remove-mremap-from-seccomp-baseline-policy.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 16 Apr 2022 10:14:28 +0200
 3 | Subject: Remove mremap from seccomp baseline policy
 4 | 
 5 | See also:
 6 | * https://bugs.chromium.org/p/chromium/issues/detail?id=1288042
 7 | * https://docs.hexavalent.org/sandboxing/mremap.html
 8 | 
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc | 1 -
12 |  1 file changed, 1 deletion(-)
13 | 
14 | diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc
15 | --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc
16 | +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc
17 | @@ -165,7 +165,6 @@ ResultExpr BaselinePolicyAndroid::EvaluateSyscall(int sysno) const {
18 |      case __NR_getdents64:
19 |      case __NR_getpriority:
20 |      case __NR_membarrier:  // https://crbug.com/966433
21 | -    case __NR_mremap:
22 |  #if defined(__i386__)
23 |      // Used on pre-N to initialize threads in ART.
24 |      case __NR_modify_ldt:
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/Remove-navigator.connection-info.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Thu, 14 Jul 2022 09:48:45 +0000
 3 | Subject: Remove navigator.connection info
 4 | 
 5 | Change the result of navigator.connection to default values
 6 | and disable observers
 7 | 
 8 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  .../renderer/modules/netinfo/network_information.cc   |  5 ++++-
12 |  .../platform/network/network_state_notifier.cc        | 11 +++++++++++
13 |  .../platform/network/network_state_notifier.h         |  2 +-
14 |  3 files changed, 16 insertions(+), 2 deletions(-)
15 | 
16 | diff --git a/third_party/blink/renderer/modules/netinfo/network_information.cc b/third_party/blink/renderer/modules/netinfo/network_information.cc
17 | --- a/third_party/blink/renderer/modules/netinfo/network_information.cc
18 | +++ b/third_party/blink/renderer/modules/netinfo/network_information.cc
19 | @@ -61,7 +61,7 @@ NetworkInformation::~NetworkInformation() {
20 |  }
21 |  
22 |  bool NetworkInformation::IsObserving() const {
23 | -  return !!connection_observer_handle_;
24 | +  return false;
25 |  }
26 |  
27 |  String NetworkInformation::type() const {
28 | @@ -147,6 +147,7 @@ void NetworkInformation::ConnectionChange(
29 |      const absl::optional<base::TimeDelta>& transport_rtt,
30 |      const absl::optional<double>& downlink_mbps,
31 |      bool save_data) {
32 | +  if ((true)) return;
33 |    DCHECK(GetExecutionContext()->IsContextThread());
34 |  
35 |    const String host = Host();
36 | @@ -242,6 +243,7 @@ void NetworkInformation::ContextDestroyed() {
37 |  }
38 |  
39 |  void NetworkInformation::StartObserving() {
40 | +  if ((true)) return;
41 |    if (!IsObserving() && !context_stopped_) {
42 |      type_ = GetNetworkStateNotifier().ConnectionType();
43 |      DCHECK(!connection_observer_handle_);
44 | @@ -252,6 +254,7 @@ void NetworkInformation::StartObserving() {
45 |  }
46 |  
47 |  void NetworkInformation::StopObserving() {
48 | +  if ((true)) return;
49 |    if (IsObserving()) {
50 |      DCHECK(connection_observer_handle_);
51 |      connection_observer_handle_ = nullptr;
52 | diff --git a/third_party/blink/renderer/platform/network/network_state_notifier.cc b/third_party/blink/renderer/platform/network/network_state_notifier.cc
53 | --- a/third_party/blink/renderer/platform/network/network_state_notifier.cc
54 | +++ b/third_party/blink/renderer/platform/network/network_state_notifier.cc
55 | @@ -99,6 +99,17 @@ NetworkStateNotifier::ScopedNotifier::~ScopedNotifier() {
56 |    }
57 |  }
58 |  
59 | +NetworkStateNotifier::NetworkStateNotifier() : has_override_(false) {
60 | +  // set default data
61 | +  SetNetworkConnectionInfoOverride(
62 | +    /*on_line*/ true,
63 | +    /*type*/ WebConnectionType::kWebConnectionTypeWifi,
64 | +    /*effective_type*/ absl::nullopt,
65 | +    /*http_rtt_msec*/ 0,
66 | +    /*max_bandwidth_mbps*/ std::numeric_limits<double>::max());
67 | +  SetNetworkQuality(/*effective_type*/ WebEffectiveConnectionType::kType4G, base::TimeDelta(), base::TimeDelta(), 10000);
68 | +}
69 | +
70 |  NetworkStateNotifier::NetworkStateObserverHandle::NetworkStateObserverHandle(
71 |      NetworkStateNotifier* notifier,
72 |      NetworkStateNotifier::ObserverType type,
73 | diff --git a/third_party/blink/renderer/platform/network/network_state_notifier.h b/third_party/blink/renderer/platform/network/network_state_notifier.h
74 | --- a/third_party/blink/renderer/platform/network/network_state_notifier.h
75 | +++ b/third_party/blink/renderer/platform/network/network_state_notifier.h
76 | @@ -122,7 +122,7 @@ class PLATFORM_EXPORT NetworkStateNotifier {
77 |      scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
78 |    };
79 |  
80 | -  NetworkStateNotifier() : has_override_(false) {}
81 | +  NetworkStateNotifier();
82 |    NetworkStateNotifier(const NetworkStateNotifier&) = delete;
83 |    NetworkStateNotifier& operator=(const NetworkStateNotifier&) = delete;
84 |  
85 | --
86 | 2.25.1
87 | 


--------------------------------------------------------------------------------
/build/patches/Remove-segmentation-platform.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Thu, 9 Jun 2022 19:45:03 +0000
 3 | Subject: Remove segmentation platform
 4 | 
 5 | Also fixes a crash on startup.
 6 | 
 7 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  ...rome_browser_main_extra_parts_segmentation_platform.cc | 4 ++++
11 |  components/segmentation_platform/public/features.cc       | 8 ++------
12 |  2 files changed, 6 insertions(+), 6 deletions(-)
13 | 
14 | diff --git a/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc b/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc
15 | --- a/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc
16 | +++ b/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc
17 | @@ -12,17 +12,20 @@
18 |  #include "components/segmentation_platform/public/segmentation_platform_service.h"
19 |  
20 |  void ChromeBrowserMainExtraPartsSegmentationPlatform::PreCreateThreads() {
21 | +  if ((true)) return;
22 |    segmentation_platform::LocalStateHelper::GetInstance().Initialize(
23 |        g_browser_process->local_state());
24 |  }
25 |  
26 |  void ChromeBrowserMainExtraPartsSegmentationPlatform::PreProfileInit() {
27 | +  if ((true)) return;
28 |    segmentation_platform::UkmDatabaseClient::GetInstance().PreProfileInit();
29 |  }
30 |  
31 |  void ChromeBrowserMainExtraPartsSegmentationPlatform::PostProfileInit(
32 |      Profile* profile,
33 |      bool is_initial_profile) {
34 | +  if ((true)) return;
35 |    if (!profile || profile->IsOffTheRecord())
36 |      return;
37 |  
38 | @@ -34,5 +37,6 @@ void ChromeBrowserMainExtraPartsSegmentationPlatform::PostProfileInit(
39 |  }
40 |  
41 |  void ChromeBrowserMainExtraPartsSegmentationPlatform::PostMainMessageLoopRun() {
42 | +  if ((true)) return;
43 |    segmentation_platform::UkmDatabaseClient::GetInstance().PostMessageLoopRun();
44 |  }
45 | diff --git a/components/segmentation_platform/public/features.cc b/components/segmentation_platform/public/features.cc
46 | --- a/components/segmentation_platform/public/features.cc
47 | +++ b/components/segmentation_platform/public/features.cc
48 | @@ -9,8 +9,8 @@
49 |  namespace segmentation_platform::features {
50 |  
51 |  BASE_FEATURE(kSegmentationPlatformFeature,
52 | -             "SegmentationPlatform",
53 | -             base::FEATURE_ENABLED_BY_DEFAULT);
54 | +             "SegmentationPlatform",                // disabled by default
55 | +             base::FEATURE_DISABLED_BY_DEFAULT);    // in Bromite
56 |  
57 |  BASE_FEATURE(kSegmentationStructuredMetricsFeature,
58 |               "SegmentationStructuredMetrics",
59 | @@ -34,11 +34,7 @@ BASE_FEATURE(kSegmentationPlatformSearchUser,
60 |  
61 |  BASE_FEATURE(kSegmentationPlatformFeedSegmentFeature,
62 |               "SegmentationPlatformFeedSegmentFeature",
63 | -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
64 | -             base::FEATURE_ENABLED_BY_DEFAULT);
65 | -#else
66 |               base::FEATURE_DISABLED_BY_DEFAULT);
67 | -#endif
68 |  
69 |  BASE_FEATURE(kResumeHeavyUserSegmentFeature,
70 |               "ResumeHeavyUserSegment",
71 | --
72 | 2.25.1
73 | 


--------------------------------------------------------------------------------
/build/patches/Remove-weblayer-dependency-on-Play-Services.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 27 Sep 2020 09:24:16 +0200
 3 | Subject: Remove weblayer dependency on Play Services
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  weblayer/browser/java/BUILD.gn | 1 -
 8 |  1 file changed, 1 deletion(-)
 9 | 
10 | diff --git a/weblayer/browser/java/BUILD.gn b/weblayer/browser/java/BUILD.gn
11 | --- a/weblayer/browser/java/BUILD.gn
12 | +++ b/weblayer/browser/java/BUILD.gn
13 | @@ -105,7 +105,6 @@ android_library("base_module_java") {
14 |    ]
15 |    deps = [
16 |      ":base_module_interfaces_java",
17 | -    "$google_play_services_package:google_play_services_basement_java",
18 |      "//base:base_java",
19 |      "//base:jni_java",
20 |      "//build/android:build_java",
21 | --
22 | 2.25.1
23 | 


--------------------------------------------------------------------------------
/build/patches/Remove-window-name-on-cross-origin-navigation.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Sat, 9 Jul 2022 06:59:18 +0000
 3 | Subject: Remove window name on cross origin navigation
 4 | 
 5 | See also: https://trac.webkit.org/changeset/209076/webkit
 6 | 
 7 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  third_party/blink/renderer/core/loader/document_loader.cc | 3 ++-
11 |  1 file changed, 2 insertions(+), 1 deletion(-)
12 | 
13 | diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
14 | --- a/third_party/blink/renderer/core/loader/document_loader.cc
15 | +++ b/third_party/blink/renderer/core/loader/document_loader.cc
16 | @@ -2474,7 +2474,7 @@ void DocumentLoader::CommitNavigation() {
17 |      // that the name would be nulled and if the name is accessed after we will
18 |      // fire a UseCounter. If we decide to move forward with this change, we'd
19 |      // actually clean the name here.
20 | -    // frame_->tree().setName(g_null_atom);
21 | +    frame_->Tree().SetName(g_null_atom);
22 |      frame_->Tree().ExperimentalSetNulledName();
23 |    }
24 |  
25 | @@ -2485,6 +2485,7 @@ void DocumentLoader::CommitNavigation() {
26 |      // TODO(shuuran): CrossSiteCrossBrowsingContextGroupSetNulledName will just
27 |      // record the fact that the name would be nulled and if the name is accessed
28 |      // after we will fire a UseCounter.
29 | +    frame_->Tree().SetName(g_null_atom);
30 |      frame_->Tree().CrossSiteCrossBrowsingContextGroupSetNulledName();
31 |    }
32 |  
33 | --
34 | 2.25.1
35 | 


--------------------------------------------------------------------------------
/build/patches/Replace-DoH-probe-domain-with-RIPE-domain.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 27 Oct 2019 10:00:13 +0100
 3 | Subject: Replace DoH probe domain with RIPE domain
 4 | 
 5 | Replace known good hostname
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/net/dns_probe_runner.cc | 2 +-
10 |  net/dns/dns_transaction.h              | 2 +-
11 |  2 files changed, 2 insertions(+), 2 deletions(-)
12 | 
13 | diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc
14 | --- a/chrome/browser/net/dns_probe_runner.cc
15 | +++ b/chrome/browser/net/dns_probe_runner.cc
16 | @@ -18,7 +18,7 @@
17 |  
18 |  namespace chrome_browser_net {
19 |  
20 | -const char DnsProbeRunner::kKnownGoodHostname[] = "google.com";
21 | +const char DnsProbeRunner::kKnownGoodHostname[] = "www.ripe.net";
22 |  
23 |  namespace {
24 |  
25 | diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
26 | --- a/net/dns/dns_transaction.h
27 | +++ b/net/dns/dns_transaction.h
28 | @@ -29,7 +29,7 @@ class NetLogWithSource;
29 |  class ResolveContext;
30 |  
31 |  // The hostname probed by CreateDohProbeRunner().
32 | -inline constexpr base::StringPiece kDohProbeHostname = "www.gstatic.com";
33 | +inline constexpr base::StringPiece kDohProbeHostname = "www.ripe.net";
34 |  
35 |  // DnsTransaction implements a stub DNS resolver as defined in RFC 1034.
36 |  // The DnsTransaction takes care of retransmissions, name server fallback (or
37 | --
38 | 2.25.1
39 | 


--------------------------------------------------------------------------------
/build/patches/Restore-classic-new-tab-page.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 26 Nov 2017 11:40:05 +0100
 3 | Subject: Restore classic new tab page
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/browser/search/search.cc | 42 +++------------------------------
 8 |  1 file changed, 3 insertions(+), 39 deletions(-)
 9 | 
10 | diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
11 | --- a/chrome/browser/search/search.cc
12 | +++ b/chrome/browser/search/search.cc
13 | @@ -94,16 +94,6 @@ enum NewTabURLState {
14 |    NEW_TAB_URL_MAX
15 |  };
16 |  
17 | -const TemplateURL* GetDefaultSearchProviderTemplateURL(Profile* profile) {
18 | -  if (profile) {
19 | -    TemplateURLService* template_url_service =
20 | -        TemplateURLServiceFactory::GetForProfile(profile);
21 | -    if (template_url_service)
22 | -      return template_url_service->GetDefaultSearchProvider();
23 | -  }
24 | -  return nullptr;
25 | -}
26 | -
27 |  bool IsMatchingServiceWorker(const GURL& my_url, const GURL& document_url) {
28 |    // The origin should match.
29 |    if (!MatchesOrigin(my_url, document_url))
30 | @@ -137,31 +127,6 @@ bool IsNTPOrRelatedURLHelper(const GURL& url, Profile* profile) {
31 |                                      IsMatchingServiceWorker(url, new_tab_url));
32 |  }
33 |  
34 | -bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
35 | -#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
36 | -  // If this isn't a supervised child user, skip the URL filter check, since it
37 | -  // can be fairly expensive.
38 | -  if (!profile->IsChild())
39 | -    return true;
40 | -  SupervisedUserService* supervised_user_service =
41 | -      SupervisedUserServiceFactory::GetForProfile(profile);
42 | -  SupervisedUserURLFilter* url_filter = supervised_user_service->GetURLFilter();
43 | -  if (url_filter->GetFilteringBehaviorForURL(url) ==
44 | -          SupervisedUserURLFilter::BLOCK) {
45 | -    return false;
46 | -  }
47 | -#endif
48 | -  return true;
49 | -}
50 | -
51 | -bool ShouldShowLocalNewTab(Profile* profile) {
52 | -#if !BUILDFLAG(IS_ANDROID)
53 | -  return DefaultSearchProviderIsGoogle(profile);
54 | -#else
55 | -  return false;
56 | -#endif
57 | -}
58 | -
59 |  // Used to look up the URL to use for the New Tab page. Also tracks how we
60 |  // arrived at that URL so it can be logged with UMA.
61 |  struct NewTabURLDetails {
62 | @@ -184,10 +149,9 @@ struct NewTabURLDetails {
63 |                               : chrome::kChromeUINewTabPageThirdPartyURL);
64 |  #endif
65 |  
66 | -    if (ShouldShowLocalNewTab(profile))
67 | -      return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
68 | +    return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
69 |  
70 | -    const TemplateURL* template_url =
71 | +/*    const TemplateURL* template_url =
72 |          GetDefaultSearchProviderTemplateURL(profile);
73 |      if (!profile || !template_url)
74 |        return NewTabURLDetails(local_url, NEW_TAB_URL_BAD);
75 | @@ -203,7 +167,7 @@ struct NewTabURLDetails {
76 |      if (!IsURLAllowedForSupervisedUser(search_provider_url, profile))
77 |        return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED);
78 |  
79 | -    return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID);
80 | +    return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID);*/
81 |    }
82 |  
83 |    const GURL url;
84 | --
85 | 2.25.1
86 | 


--------------------------------------------------------------------------------
/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 2 Dec 2019 21:15:32 +0100
 3 | Subject: Revert "flags: remove disable-pull-to-refresh-effect"
 4 | 
 5 | This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
 6 | 
 7 | Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  chrome/browser/about_flags.cc       | 4 ++++
11 |  chrome/browser/flag-metadata.json   | 4 ++++
12 |  chrome/browser/flag_descriptions.cc | 4 ++++
13 |  chrome/browser/flag_descriptions.h  | 3 +++
14 |  4 files changed, 15 insertions(+)
15 | 
16 | diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
17 | --- a/chrome/browser/about_flags.cc
18 | +++ b/chrome/browser/about_flags.cc
19 | @@ -4334,6 +4334,10 @@ const FeatureEntry kFeatureEntries[] = {
20 |       flag_descriptions::kEnableVulkanDescription,
21 |       kOsWin | kOsLinux | kOsAndroid, FEATURE_VALUE_TYPE(features::kVulkan)},
22 |  #if BUILDFLAG(IS_ANDROID)
23 | +    {switches::kDisablePullToRefreshEffect,
24 | +     flag_descriptions::kDisablePullToRefreshEffectName,
25 | +     flag_descriptions::kDisablePullToRefreshEffectDescription, kOsAndroid,
26 | +     SINGLE_DISABLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)},
27 |      {"translate-force-trigger-on-english",
28 |       flag_descriptions::kTranslateForceTriggerOnEnglishName,
29 |       flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
30 | diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
31 | --- a/chrome/browser/flag-metadata.json
32 | +++ b/chrome/browser/flag-metadata.json
33 | @@ -1451,6 +1451,10 @@
34 |        "yangsharon@google.com", "alexmos@google.com", "creis@google.com" ],
35 |      "expiry_milestone": 110
36 |    },
37 | +  {
38 | +    "name": "disable-pull-to-refresh-effect",
39 | +    "expiry_milestone": -1
40 | +  },
41 |    {
42 |      "name": "disable-quick-answers-v2-translation",
43 |      "owners": [ "croissant-eng" ],
44 | diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
45 | --- a/chrome/browser/flag_descriptions.cc
46 | +++ b/chrome/browser/flag_descriptions.cc
47 | @@ -3988,6 +3988,10 @@ const char kReadLaterDescription[] =
48 |      "Allow users to save tabs for later. Enables a new button and menu for "
49 |      "accessing tabs saved for later.";
50 |  
51 | +const char kDisablePullToRefreshEffectName[] = "The pull-to-refresh effect";
52 | +const char kDisablePullToRefreshEffectDescription[] =
53 | +    "Page reloads triggered by vertically overscrolling content.";
54 | +
55 |  const char kReaderModeHeuristicsName[] = "Reader Mode triggering";
56 |  const char kReaderModeHeuristicsDescription[] =
57 |      "Determines what pages the Reader Mode infobar is shown on.";
58 | diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
59 | --- a/chrome/browser/flag_descriptions.h
60 | +++ b/chrome/browser/flag_descriptions.h
61 | @@ -2275,6 +2275,9 @@ extern const char kQueryTilesSegmentationDescription[];
62 |  extern const char kQueryTilesSwapTrendingName[];
63 |  extern const char kQueryTilesSwapTrendingDescription[];
64 |  
65 | +extern const char kDisablePullToRefreshEffectName[];
66 | +extern const char kDisablePullToRefreshEffectDescription[];
67 | +
68 |  extern const char kReaderModeHeuristicsName[];
69 |  extern const char kReaderModeHeuristicsDescription[];
70 |  extern const char kReaderModeHeuristicsMarkup[];
71 | --
72 | 2.25.1
73 | 


--------------------------------------------------------------------------------
/build/patches/Samsung-Note-9-SDK27-crazylinker-workaround.patch:
--------------------------------------------------------------------------------
 1 | From: uazo <uazo@users.noreply.github.com>
 2 | Date: Thu, 3 Feb 2022 19:48:49 +0000
 3 | Subject: Samsung Note 9 SDK27 crazylinker workaround
 4 | 
 5 | Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  .../base/library_loader/LibraryLoader.java    | 23 ++++++++++++++++++-
 9 |  1 file changed, 22 insertions(+), 1 deletion(-)
10 | 
11 | diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
12 | --- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
13 | +++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
14 | @@ -517,8 +517,29 @@ public class LibraryLoader {
15 |      // Note: This cannot be done in the build configuration, as otherwise chrome_public_apk cannot
16 |      // both be used as the basis to ship on L, and the default APK used by developers on 10+.
17 |      private boolean forceSystemLinker() {
18 | -        return mUseChromiumLinker && !mUseModernLinker
19 | +        boolean result = false;
20 | +        String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.US);
21 | +        if (manufacturer.equals("samsung")
22 | +                && Build.MODEL != null
23 | +                && Build.MODEL.equals("SM-N960F")) {
24 | +            // Samsung Galaxy Note 9 (on Android 8.1) - Model SM-N960F
25 | +            // crashes on startup (base::MessagePumpForUI::MessagePumpForUI) due to
26 | +            // some odd RELRO incompatibility in the device ROM.
27 | +            // This workaround disables relocation sharing but allows device to start up.
28 | +            // See also:
29 | +            // * https://bugs.chromium.org/p/chromium/issues/detail?id=980304
30 | +            // * https://groups.google.com/a/chromium.org/g/chromium-dev/c/iAb7QUiNPLw
31 | +            result = true;
32 | +        } else {
33 | +            result = mUseChromiumLinker && !mUseModernLinker
34 |                  && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q;
35 | +        }
36 | +        if (result) {
37 | +            Log.d(TAG,
38 | +                    "Forcing system linker, relocations will not be shared. "
39 | +                            + "This negatively impacts memory usage.");
40 | +        }
41 | +        return result;
42 |      }
43 |  
44 |      // Whether a Linker subclass is used for loading. Even if returns |true|, the Linker can
45 | --
46 | 2.25.1
47 | 


--------------------------------------------------------------------------------
/build/patches/Switch-to-fstack-protector-strong.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Wed, 26 Dec 2018 10:20:24 -0500
 3 | Subject: Switch to -fstack-protector-strong
 4 | 
 5 | This compiler option is already used for ChromeOS, but not yet on other
 6 | platforms because there is push back against enabling an option resulting in
 7 | ~1-2% lower performance and ~2-3% larger binaries.
 8 | 
 9 | The size increase on Android is something they care a lot about since some
10 | devices have very little storage space. That also means ever so slightly
11 | higher memory/cache usage but not by the full 2-3%.
12 | 
13 | Original License: MIT - https://spdx.org/licenses/MIT.html
14 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
15 | ---
16 |  build/config/compiler/BUILD.gn | 8 +-------
17 |  1 file changed, 1 insertion(+), 7 deletions(-)
18 | 
19 | diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
20 | --- a/build/config/compiler/BUILD.gn
21 | +++ b/build/config/compiler/BUILD.gn
22 | @@ -314,18 +314,12 @@ config("compiler") {
23 |          cflags += [ "-fstack-protector" ]
24 |        }
25 |      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
26 | -      # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
27 | -      # See also https://crbug.com/533294
28 | -      if (current_os != "zos") {
29 | -        cflags += [ "--param=ssp-buffer-size=4" ]
30 | -      }
31 | -
32 |        # The x86 toolchain currently has problems with stack-protector.
33 |        if (is_android && current_cpu == "x86") {
34 |          cflags += [ "-fno-stack-protector" ]
35 |        } else if (current_os != "aix") {
36 |          # Not available on aix.
37 | -        cflags += [ "-fstack-protector" ]
38 | +        cflags += [ "-fstack-protector-strong" ]
39 |        }
40 |      }
41 |  
42 | --
43 | 2.25.1
44 | 


--------------------------------------------------------------------------------
/build/patches/Unexpire-tab-groups-flags.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 17 May 2021 22:32:36 +0200
 3 | Subject: Unexpire tab groups flags
 4 | 
 5 | Disabled by default
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/flag-metadata.json                         | 4 ++--
10 |  chrome/browser/flags/android/chrome_feature_list.cc       | 8 ++++----
11 |  .../chromium/chrome/browser/flags/CachedFeatureFlags.java | 2 +-
12 |  3 files changed, 7 insertions(+), 7 deletions(-)
13 | 
14 | diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
15 | --- a/chrome/browser/flag-metadata.json
16 | +++ b/chrome/browser/flag-metadata.json
17 | @@ -3099,7 +3099,7 @@
18 |    {
19 |      "name": "enable-tab-groups",
20 |      "owners": [ "memex-team@google.com" ],
21 | -    "expiry_milestone": 90
22 | +    "expiry_milestone": -1
23 |    },
24 |    {
25 |      "name": "enable-tab-groups-continuation",
26 | @@ -3114,7 +3114,7 @@
27 |    {
28 |      "name": "enable-tab-groups-ui-improvements",
29 |      "owners": [ "memex-team@google.com" ],
30 | -    "expiry_milestone": 90
31 | +    "expiry_milestone": -1
32 |    },
33 |    {
34 |      "name": "enable-tab-search",
35 | diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
36 | --- a/chrome/browser/flags/android/chrome_feature_list.cc
37 | +++ b/chrome/browser/flags/android/chrome_feature_list.cc
38 | @@ -977,16 +977,16 @@ BASE_FEATURE(kTabEngagementReportingAndroid,
39 |               base::FEATURE_DISABLED_BY_DEFAULT);
40 |  
41 |  BASE_FEATURE(kTabGroupsAndroid,
42 | -             "TabGroupsAndroid",
43 | -             base::FEATURE_ENABLED_BY_DEFAULT);
44 | +             "TabGroupsAndroid",                   // disabled by default
45 | +             base::FEATURE_DISABLED_BY_DEFAULT);   // in Bromite
46 |  
47 |  BASE_FEATURE(kTabGroupsContinuationAndroid,
48 |               "TabGroupsContinuationAndroid",
49 |               base::FEATURE_DISABLED_BY_DEFAULT);
50 |  
51 |  BASE_FEATURE(kTabGroupsUiImprovementsAndroid,
52 | -             "TabGroupsUiImprovementsAndroid",
53 | -             base::FEATURE_ENABLED_BY_DEFAULT);
54 | +             "TabGroupsUiImprovementsAndroid",     // disabled by default
55 | +             base::FEATURE_DISABLED_BY_DEFAULT);   // in Bromite
56 |  
57 |  BASE_FEATURE(kTabGroupsForTablets,
58 |               "TabGroupsForTablets",
59 | diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
60 | --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
61 | +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
62 | @@ -102,7 +102,7 @@ public class CachedFeatureFlags {
63 |                      .put(ChromeFeatureList.STORE_HOURS, false)
64 |                      .put(ChromeFeatureList.SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT, true)
65 |                      .put(ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID, true)
66 | -                    .put(ChromeFeatureList.TAB_GROUPS_ANDROID, true)
67 | +                    .put(ChromeFeatureList.TAB_GROUPS_ANDROID, false)
68 |                      .put(ChromeFeatureList.TAB_GROUPS_CONTINUATION_ANDROID, false)
69 |                      .put(ChromeFeatureList.TAB_GROUPS_FOR_TABLETS, false)
70 |                      .put(ChromeFeatureList.TAB_SELECTION_EDITOR_V2, false)
71 | --
72 | 2.25.1
73 | 


--------------------------------------------------------------------------------
/build/patches/Use-64-bit-WebView-processes.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Thu, 26 Jan 2017 01:30:12 -0500
 3 | Subject: Use 64-bit WebView processes
 4 | 
 5 | 64-bit processes introduce 10% or so higher memory consumption.
 6 | The reason for preferring 64-bit processes is providing substantially better
 7 | exploit mitigations at the expense of slightly more memory usage.
 8 | 
 9 | In addition to the standard mitigations, it also enables usage of
10 | https://github.com/AndroidHardening/hardened_malloc (where available).
11 | 
12 | It will provide high entropy ASLR (24-bit to 32-bit depending on whether the
13 | kernel uses 3 or 4 level page tables rather than 16-bit for 32-bit processes),
14 | high entropy stack canaries (56/64-bit instead of 24/32-bit depending on
15 | whether a zero byte is used) and also features like pointer authentication and
16 | memory tagging when those are made available in the future.
17 | 
18 | The reason why upstream started preferring 32-bit processes is to save memory,
19 | particularly since saving memory makes it feasible to use finer-grained
20 | sandboxing.
21 | 
22 | Original License: MIT - https://spdx.org/licenses/MIT.html
23 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
24 | ---
25 |  android_webview/nonembedded/java/AndroidManifest.xml | 1 -
26 |  1 file changed, 1 deletion(-)
27 | 
28 | diff --git a/android_webview/nonembedded/java/AndroidManifest.xml b/android_webview/nonembedded/java/AndroidManifest.xml
29 | --- a/android_webview/nonembedded/java/AndroidManifest.xml
30 | +++ b/android_webview/nonembedded/java/AndroidManifest.xml
31 | @@ -37,7 +37,6 @@ by a child template that "extends" this file.
32 |                   android:icon="@{{manifest_package|default('com.android.webview')}}:drawable/icon_webview"
33 |                   android:name="{{ application_name|default('org.chromium.android_webview.nonembedded.WebViewApkApplication') }}"
34 |                   android:multiArch="true"
35 | -                 {{ use32bitAbi|default('android:use32bitAbi="true"') }}
36 |                   android:extractNativeLibs="{{ trichrome_library is not defined }}">
37 |          {# This part is shared between stand-alone WebView and Monochrome #}
38 |          {% macro common(manifest_package, webview_lib) %}
39 | --
40 | 2.25.1
41 | 


--------------------------------------------------------------------------------
/build/patches/disable-AdsBlockedInfoBar.patch:
--------------------------------------------------------------------------------
 1 | From: Zoraver Kang <zkang@wpi.edu>
 2 | Date: Mon, 26 Aug 2019 17:54:28 -0400
 3 | Subject: disable AdsBlockedInfoBar
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../browser/profile_interaction_manager.cc    | 48 -------------------
 8 |  1 file changed, 48 deletions(-)
 9 | 
10 | diff --git a/components/subresource_filter/content/browser/profile_interaction_manager.cc b/components/subresource_filter/content/browser/profile_interaction_manager.cc
11 | --- a/components/subresource_filter/content/browser/profile_interaction_manager.cc
12 | +++ b/components/subresource_filter/content/browser/profile_interaction_manager.cc
13 | @@ -19,13 +19,6 @@
14 |  #include "content/public/browser/render_frame_host.h"
15 |  #include "content/public/browser/web_contents.h"
16 |  
17 | -#if BUILDFLAG(IS_ANDROID)
18 | -#include "components/infobars/content/content_infobar_manager.h"  // nogncheck
19 | -#include "components/messages/android/message_dispatcher_bridge.h"
20 | -#include "components/messages/android/messages_feature.h"
21 | -#include "components/subresource_filter/content/browser/ads_blocked_infobar_delegate.h"
22 | -#endif
23 | -
24 |  namespace subresource_filter {
25 |  
26 |  ProfileInteractionManager::ProfileInteractionManager(
27 | @@ -135,47 +128,6 @@ void ProfileInteractionManager::MaybeShowNotification() {
28 |    // currently primary.
29 |    DCHECK(page_);
30 |    DCHECK(page_->IsPrimary());
31 | -
32 | -  const GURL& top_level_url = page_->GetMainDocument().GetLastCommittedURL();
33 | -  if (profile_context_->settings_manager()->ShouldShowUIForSite(
34 | -          top_level_url)) {
35 | -#if BUILDFLAG(IS_ANDROID)
36 | -    if (messages::IsAdsBlockedMessagesUiEnabled() &&
37 | -        messages::MessageDispatcherBridge::Get()
38 | -            ->IsMessagesEnabledForEmbedder()) {
39 | -      subresource_filter::AdsBlockedMessageDelegate::CreateForWebContents(
40 | -          GetWebContents());
41 | -      ads_blocked_message_delegate_ =
42 | -          subresource_filter::AdsBlockedMessageDelegate::FromWebContents(
43 | -              GetWebContents());
44 | -      ads_blocked_message_delegate_->ShowMessage();
45 | -    } else {
46 | -      // NOTE: It is acceptable for the embedder to not have installed an
47 | -      // infobar manager.
48 | -      if (auto* infobar_manager =
49 | -              infobars::ContentInfoBarManager::FromWebContents(
50 | -                  GetWebContents())) {
51 | -        subresource_filter::AdsBlockedInfobarDelegate::Create(infobar_manager);
52 | -      }
53 | -    }
54 | -#endif
55 | -
56 | -    // TODO(https://crbug.com/1103176): Plumb the actual frame reference here
57 | -    // (it comes from
58 | -    // ContentSubresourceFilterThrottleManager::DidDisallowFirstSubresource,
59 | -    // which comes from a specific frame).
60 | -    content_settings::PageSpecificContentSettings* content_settings =
61 | -        content_settings::PageSpecificContentSettings::GetForFrame(
62 | -            &page_->GetMainDocument());
63 | -    content_settings->OnContentBlocked(ContentSettingsType::ADS);
64 | -
65 | -    ContentSubresourceFilterThrottleManager::LogAction(
66 | -        SubresourceFilterAction::kUIShown);
67 | -    profile_context_->settings_manager()->OnDidShowUI(top_level_url);
68 | -  } else {
69 | -    ContentSubresourceFilterThrottleManager::LogAction(
70 | -        SubresourceFilterAction::kUISuppressed);
71 | -  }
72 |  }
73 |  
74 |  content::WebContents* ProfileInteractionManager::GetWebContents() {
75 | --
76 | 2.25.1
77 | 


--------------------------------------------------------------------------------
/build/patches/disable-WebView-variations-support.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Thu, 10 Dec 2020 10:09:18 -0500
 3 | Subject: disable WebView variations support
 4 | 
 5 | Original License: MIT - https://spdx.org/licenses/MIT.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  .../com/android/webview/chromium/WebViewChromiumAwInit.java   | 4 ----
 9 |  .../webview/chromium/WebViewChromiumFactoryProvider.java      | 2 --
10 |  2 files changed, 6 deletions(-)
11 | 
12 | diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
13 | --- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
14 | +++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
15 | @@ -199,10 +199,6 @@ public class WebViewChromiumAwInit {
16 |  
17 |              AwBrowserProcess.configureChildProcessLauncher();
18 |  
19 | -            // finishVariationsInitLocked() must precede native initialization so the seed is
20 | -            // available when AwFeatureListCreator::SetUpFieldTrials() runs.
21 | -            finishVariationsInitLocked();
22 | -
23 |              AwBrowserProcess.start();
24 |              AwBrowserProcess.handleMinidumpsAndSetMetricsConsent(true /* updateMetricsConsent */);
25 |  
26 | diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
27 | --- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
28 | +++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
29 | @@ -500,8 +500,6 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
30 |                  }
31 |              }
32 |  
33 | -            mAwInit.startVariationsInit();
34 | -
35 |              mShouldDisableThreadChecking = shouldDisableThreadChecking(ctx);
36 |  
37 |              setSingleton(this);
38 | --
39 | 2.25.1
40 | 


--------------------------------------------------------------------------------
/build/patches/disable-appending-variations-header.patch:
--------------------------------------------------------------------------------
 1 | From: Zoraver Kang <Zoraver@users.noreply.github.com>
 2 | Date: Sat, 15 Jan 2022 13:34:33 -0500
 3 | Subject: disable appending variations header
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/variations/net/variations_http_headers.cc | 5 +----
 8 |  1 file changed, 1 insertion(+), 4 deletions(-)
 9 | 
10 | diff --git a/components/variations/net/variations_http_headers.cc b/components/variations/net/variations_http_headers.cc
11 | --- a/components/variations/net/variations_http_headers.cc
12 | +++ b/components/variations/net/variations_http_headers.cc
13 | @@ -118,10 +118,7 @@ URLValidationResult GetUrlValidationResult(const GURL& url) {
14 |  // Also, logs the result of validating |url| in histograms, one of which ends in
15 |  // |suffix|.
16 |  bool ShouldAppendVariationsHeader(const GURL& url, const std::string& suffix) {
17 | -  URLValidationResult result = GetUrlValidationResult(url);
18 | -  base::UmaHistogramEnumeration(
19 | -      "Variations.Headers.URLValidationResult." + suffix, result);
20 | -  return result == URLValidationResult::kShouldAppend;
21 | +  return false;
22 |  }
23 |  
24 |  // Returns true if the request is sent from a Google web property, i.e. from a
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/disable-battery-status-updater.patch:
--------------------------------------------------------------------------------
 1 | From: Joachim Bauch <jojo@struktur.de>
 2 | Date: Tue, 4 Aug 2015 15:15:53 +0200
 3 | Subject: disable battery status updater
 4 | 
 5 | The W3C Battery Status API[1] has quite a laughable statement:
 6 | 
 7 | "The information disclosed has minimal impact on privacy or
 8 | fingerprinting, and therefore is exposed without permission grants".
 9 | 
10 | Along comes a paper "The leaking battery, A privacy analysis of the
11 | HTML5 Battery Status API."
12 | 
13 | Clean up after the W3C and disable the battery status updater which
14 | could be used to identity users[2].
15 | 
16 | [1] http://www.w3.org/TR/battery-status/
17 | [2] https://eprint.iacr.org/2015/616.pdf
18 | 
19 | References: https://github.com/iridium-browser/iridium-browser/issues/40
20 | 
21 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
22 | ---
23 |  services/device/battery/battery_status_service.cc | 2 ++
24 |  1 file changed, 2 insertions(+)
25 | 
26 | diff --git a/services/device/battery/battery_status_service.cc b/services/device/battery/battery_status_service.cc
27 | --- a/services/device/battery/battery_status_service.cc
28 | +++ b/services/device/battery/battery_status_service.cc
29 | @@ -43,6 +43,7 @@ base::CallbackListSubscription BatteryStatusService::AddCallback(
30 |    if (!battery_fetcher_)
31 |      battery_fetcher_ = BatteryStatusManager::Create(update_callback_);
32 |  
33 | +#if 0
34 |    if (callback_list_.empty()) {
35 |      bool success = battery_fetcher_->StartListeningBatteryChange();
36 |      // On failure pass the default values back.
37 | @@ -54,6 +55,7 @@ base::CallbackListSubscription BatteryStatusService::AddCallback(
38 |      // Send recent status to the new callback if already available.
39 |      callback.Run(status_);
40 |    }
41 | +#endif
42 |  
43 |    return callback_list_.Add(callback);
44 |  }
45 | --
46 | 2.25.1
47 | 


--------------------------------------------------------------------------------
/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Mon, 15 Sep 2014 10:58:42 +0200
 3 | Subject: dns: send IPv6 connectivity probes to RIPE DNS
 4 | 
 5 | Short of disabling the code (we may do that in a subsequent patch
 6 | anyway), avoid sending to Google.
 7 | 
 8 | Increase probe period from 1s to 15s
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  net/dns/host_resolver_manager.cc | 10 +++++-----
13 |  1 file changed, 5 insertions(+), 5 deletions(-)
14 | 
15 | diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
16 | --- a/net/dns/host_resolver_manager.cc
17 | +++ b/net/dns/host_resolver_manager.cc
18 | @@ -151,12 +151,12 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds;
19 |  
20 |  // Time between IPv6 probes, i.e. for how long results of each IPv6 probe are
21 |  // cached.
22 | -const int kIPv6ProbePeriodMs = 1000;
23 | +const int kIPv6ProbePeriodMs = 15000;
24 |  
25 | -// Google DNS address used for IPv6 probes.
26 | -const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x48, 0x60, 0x48, 0x60,
27 | -                                     0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
28 | -                                     0x00, 0x00, 0x88, 0x88};
29 | +// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted)
30 | +const uint8_t kIPv6ProbeAddress[] =
31 | +    { 0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, 0x00, 0x00,
32 | +      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };
33 |  
34 |  // ICANN uses this localhost address to indicate a name collision.
35 |  //
36 | --
37 | 2.25.1
38 | 


--------------------------------------------------------------------------------
/build/patches/do-not-add-suffix-to-package-name.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 11 Jul 2020 15:00:13 +0200
 3 | Subject: do not add suffix to package name
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/android/BUILD.gn | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
11 | --- a/chrome/android/BUILD.gn
12 | +++ b/chrome/android/BUILD.gn
13 | @@ -54,7 +54,7 @@ if (current_toolchain == default_toolchain) {
14 |    _default_package = "org.chromium.chrome"
15 |    if (use_stable_package_name_for_trichrome) {
16 |      _default_package += ".stable"
17 | -  } else if (android_channel != "default") {
18 | +  } else if (android_channel != "default" && android_channel != "stable") {
19 |      # android-binary-size trybot may checks if an internal Chrome variant's
20 |      # AndroidManifest is as expected by ensuring the differences between its
21 |      # AndroidManifest and its upstream target's .AndroidManifest.expected file
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/do-not-hide-.orig-files.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 21 Jan 2019 09:17:05 +0100
 3 | Subject: do not hide .orig files
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .gitignore | 2 +-
 8 |  1 file changed, 1 insertion(+), 1 deletion(-)
 9 | 
10 | diff --git a/.gitignore b/.gitignore
11 | --- a/.gitignore
12 | +++ b/.gitignore
13 | @@ -4,7 +4,7 @@
14 |  *.mk
15 |  *.ncb
16 |  *.opensdf
17 | -*.orig
18 | +# *.orig
19 |  *.pdb
20 |  *.props
21 |  *.pyc
22 | --
23 | 2.25.1
24 | 


--------------------------------------------------------------------------------
/build/patches/enable-ftrivial-auto-var-init-zero.patch:
--------------------------------------------------------------------------------
 1 | From: Daniel Micay <danielmicay@gmail.com>
 2 | Date: Wed, 8 Apr 2020 20:48:17 -0400
 3 | Subject: enable -ftrivial-auto-var-init=zero
 4 | 
 5 | Original License: MIT - https://spdx.org/licenses/MIT.html
 6 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 7 | ---
 8 |  build/config/compiler/BUILD.gn | 4 ++++
 9 |  1 file changed, 4 insertions(+)
10 | 
11 | diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
12 | --- a/build/config/compiler/BUILD.gn
13 | +++ b/build/config/compiler/BUILD.gn
14 | @@ -334,6 +334,10 @@ config("compiler") {
15 |        cflags += [ "-fwrapv" ]
16 |      }
17 |  
18 | +    if (is_clang) {
19 | +      cflags += [ "-ftrivial-auto-var-init=zero", "-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang", "-Wno-unused-command-line-argument" ]
20 | +    }
21 | +
22 |      # Linker warnings.
23 |      if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
24 |          current_os != "zos") {
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/exit-on-failure-of-inclusion.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Fri, 6 Apr 2018 10:29:05 +0200
 3 | Subject: exit on failure of inclusion
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  chrome/installer/linux/debian/build.sh | 6 +++---
 8 |  1 file changed, 3 insertions(+), 3 deletions(-)
 9 | 
10 | diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh
11 | --- a/chrome/installer/linux/debian/build.sh
12 | +++ b/chrome/installer/linux/debian/build.sh
13 | @@ -240,15 +240,15 @@ DEB_CHANGELOG="${TMPFILEDIR}/changelog"
14 |  DEB_FILES="${TMPFILEDIR}/files"
15 |  DEB_CONTROL="${TMPFILEDIR}/control"
16 |  
17 | -source ${OUTPUTDIR}/installer/common/installer.include
18 | +source ${OUTPUTDIR}/installer/common/installer.include || exit $?
19 |  
20 |  get_version_info
21 |  VERSIONFULL="${VERSION}-${PACKAGE_RELEASE}"
22 |  
23 |  if [ "$BRANDING" = "google_chrome" ]; then
24 | -  source "${OUTPUTDIR}/installer/common/google-chrome.info"
25 | +  source "${OUTPUTDIR}/installer/common/google-chrome.info" || exit $?
26 |  else
27 | -  source "${OUTPUTDIR}/installer/common/chromium-browser.info"
28 | +  source "${OUTPUTDIR}/installer/common/chromium-browser.info" || exit $?
29 |  fi
30 |  eval $(sed -e "s/^\([^=]\+\)=\(.*\)$/export \1='\2'/" \
31 |    "${OUTPUTDIR}/installer/theme/BRANDING")
32 | --
33 | 2.25.1
34 | 


--------------------------------------------------------------------------------
/build/patches/first_run-deactivate-autoupdate-globally.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Sat, 13 Sep 2014 17:12:43 +0200
 3 | Subject: first_run: deactivate autoupdate globally
 4 | 
 5 | We currently do not have any update service infrastructure in place
 6 | (i.e. on our webserver), and sending update requests to Google also
 7 | sounds meh (wrong provider, after all).
 8 | 
 9 | Also, there is no tunable in chrome://settings (or similar) yet to
10 | turn it back on.
11 | 
12 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
13 | ---
14 |  chrome/browser/extensions/extension_system_impl.cc | 3 +--
15 |  1 file changed, 1 insertion(+), 2 deletions(-)
16 | 
17 | diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
18 | --- a/chrome/browser/extensions/extension_system_impl.cc
19 | +++ b/chrome/browser/extensions/extension_system_impl.cc
20 | @@ -204,8 +204,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
21 |  
22 |    user_script_manager_ = std::make_unique<UserScriptManager>(profile_);
23 |  
24 | -  bool autoupdate_enabled = !profile_->IsGuestSession() &&
25 | -                            !profile_->IsSystemProfile();
26 | +  bool autoupdate_enabled = false;
27 |  #if BUILDFLAG(IS_CHROMEOS_ASH)
28 |    if (!extensions_enabled ||
29 |        ash::ProfileHelper::IsLockScreenAppProfile(profile_)) {
30 | --
31 | 2.25.1
32 | 


--------------------------------------------------------------------------------
/build/patches/kill-Location-fall-back-to-system.patch:
--------------------------------------------------------------------------------
 1 | From: thermatk <thermatk@thermatk.com>
 2 | Date: Fri, 22 Jun 2018 17:05:17 +0200
 3 | Subject: kill Location, fall back to system
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  services/device/geolocation/BUILD.gn                   |  1 -
 8 |  .../device/geolocation/LocationProviderFactory.java    | 10 ++--------
 9 |  2 files changed, 2 insertions(+), 9 deletions(-)
10 | 
11 | diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn
12 | --- a/services/device/geolocation/BUILD.gn
13 | +++ b/services/device/geolocation/BUILD.gn
14 | @@ -159,7 +159,6 @@ if (is_android) {
15 |        "android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
16 |        "android/java/src/org/chromium/device/geolocation/LocationProviderAndroid.java",
17 |        "android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",
18 | -      "android/java/src/org/chromium/device/geolocation/LocationProviderGmsCore.java",
19 |      ]
20 |  
21 |      deps = [
22 | diff --git a/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java b/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
23 | --- a/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
24 | +++ b/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
25 | @@ -27,19 +27,13 @@ public class LocationProviderFactory {
26 |  
27 |      @CalledByNative
28 |      public static void useGmsCoreLocationProvider() {
29 | -        sUseGmsCoreLocationProvider = true;
30 | +        sUseGmsCoreLocationProvider = false;
31 |      }
32 |  
33 |      public static LocationProvider create() {
34 |          if (sProviderImpl != null) return sProviderImpl;
35 |  
36 | -        if (sUseGmsCoreLocationProvider
37 | -                && LocationProviderGmsCore.isGooglePlayServicesAvailable(
38 | -                           ContextUtils.getApplicationContext())) {
39 | -            sProviderImpl = new LocationProviderGmsCore(ContextUtils.getApplicationContext());
40 | -        } else {
41 | -            sProviderImpl = new LocationProviderAndroid();
42 | -        }
43 | +        sProviderImpl = new LocationProviderAndroid();
44 |          return sProviderImpl;
45 |      }
46 |  }
47 | --
48 | 2.25.1
49 | 


--------------------------------------------------------------------------------
/build/patches/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Thu, 29 Jan 2015 10:46:40 +0100
 3 | Subject: mime_util: force text/x-suse-ymp to be downloaded
 4 | 
 5 | YMP files (YaST One Click Install) are plaintext XML, but also not
 6 | very interesting in themselves. Force them to be stored.
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  third_party/blink/common/mime_util/mime_util.cc | 1 +
11 |  1 file changed, 1 insertion(+)
12 | 
13 | diff --git a/third_party/blink/common/mime_util/mime_util.cc b/third_party/blink/common/mime_util/mime_util.cc
14 | --- a/third_party/blink/common/mime_util/mime_util.cc
15 | +++ b/third_party/blink/common/mime_util/mime_util.cc
16 | @@ -83,6 +83,7 @@ static const char* const kUnsupportedTextTypes[] = {
17 |      "text/x-csv",
18 |      "text/x-vcf",
19 |      "text/rtf",
20 | +    "text/x-suse-ymp",
21 |      "text/comma-separated-values",
22 |      "text/csv",
23 |      "text/tab-separated-values",
24 | --
25 | 2.25.1
26 | 


--------------------------------------------------------------------------------
/build/patches/net-cert-increase-default-key-length.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Mon, 15 Sep 2014 10:52:32 +0200
 3 | Subject: net/cert: increase default key length
 4 | 
 5 | Should we add something for chrome://settings, or just leave
 6 | it as hidden as it was before?
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  net/cert/x509_util.cc | 2 +-
11 |  1 file changed, 1 insertion(+), 1 deletion(-)
12 | 
13 | diff --git a/net/cert/x509_util.cc b/net/cert/x509_util.cc
14 | --- a/net/cert/x509_util.cc
15 | +++ b/net/cert/x509_util.cc
16 | @@ -248,7 +248,7 @@ bool GetTLSServerEndPointChannelBinding(const X509Certificate& certificate,
17 |  }
18 |  
19 |  // RSA keys created by CreateKeyAndSelfSignedCert will be of this length.
20 | -static const uint16_t kRSAKeyLength = 1024;
21 | +static const uint16_t kRSAKeyLength = 2048;
22 |  
23 |  // Certificates made by CreateKeyAndSelfSignedCert will be signed using this
24 |  // digest algorithm.
25 | --
26 | 2.25.1
27 | 


--------------------------------------------------------------------------------
/build/patches/openH264-enable-ARM-ARM64-optimizations.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 20 Jan 2018 21:17:27 +0100
 3 | Subject: openH264: enable ARM/ARM64 optimizations
 4 | 
 5 | Enable the optimizations not only for ChromeOS but for all compatbile ARM/ARM64 architectures
 6 | Limit threads auto-detect only for iOS
 7 | 
 8 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 9 | ---
10 |  .../modules/mediarecorder/h264_encoder.cc     |  8 +++----
11 |  third_party/openh264/BUILD.gn                 | 24 ++++++++++++++-----
12 |  2 files changed, 22 insertions(+), 10 deletions(-)
13 | 
14 | diff --git a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
15 | --- a/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
16 | +++ b/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
17 | @@ -222,11 +222,11 @@ bool H264Encoder::ConfigureEncoderOnEncodingTaskRunner(const gfx::Size& size) {
18 |      init_params.iRCMode = RC_OFF_MODE;
19 |    }
20 |  
21 | -#if BUILDFLAG(IS_CHROMEOS)
22 | -  init_params.iMultipleThreadIdc = 0;
23 | +#if BUILDFLAG(OS_MACOSX)
24 | +   // Threading model: Set to 1 due to https://crbug.com/583348.
25 | +   init_params.iMultipleThreadIdc = 1;
26 |  #else
27 | -  // Threading model: Set to 1 due to https://crbug.com/583348.
28 | -  init_params.iMultipleThreadIdc = 1;
29 | +  init_params.iMultipleThreadIdc = 0;
30 |  #endif
31 |  
32 |    // TODO(mcasas): consider reducing complexity if there are few CPUs available.
33 | diff --git a/third_party/openh264/BUILD.gn b/third_party/openh264/BUILD.gn
34 | --- a/third_party/openh264/BUILD.gn
35 | +++ b/third_party/openh264/BUILD.gn
36 | @@ -131,8 +131,12 @@ if (use_assembler) {
37 |  
38 |  source_set("common") {
39 |    sources = openh264_common_sources
40 | -  if (is_chromeos && current_cpu == "arm") {
41 | -    sources += openh264_common_sources_asm_arm
42 | +  if (is_chromeos || is_android) {
43 | +    if (current_cpu == "arm") {
44 | +      sources += openh264_common_sources_asm_arm
45 | +    } else if (current_cpu == "arm64") {
46 | +      sources += openh264_common_sources_asm_arm64
47 | +    }
48 |    }
49 |    include_dirs = openh264_common_include_dirs
50 |  
51 | @@ -157,8 +161,12 @@ source_set("common") {
52 |  
53 |  source_set("processing") {
54 |    sources = openh264_processing_sources
55 | -  if (is_chromeos && current_cpu == "arm") {
56 | -    sources += openh264_processing_sources_asm_arm
57 | +  if (is_chromeos || is_android) {
58 | +    if (current_cpu == "arm") {
59 | +      sources += openh264_processing_sources_asm_arm
60 | +    } else if (current_cpu == "arm64") {
61 | +      sources += openh264_processing_sources_asm_arm64
62 | +    }
63 |    }
64 |    include_dirs = openh264_processing_include_dirs
65 |  
66 | @@ -174,8 +182,12 @@ source_set("processing") {
67 |  
68 |  source_set("encoder") {
69 |    sources = openh264_encoder_sources
70 | -  if (is_chromeos && current_cpu == "arm") {
71 | -    sources += openh264_encoder_sources_asm_arm
72 | +  if (is_chromeos || is_android) {
73 | +    if (current_cpu == "arm") {
74 | +      sources += openh264_encoder_sources_asm_arm
75 | +    } else if (current_cpu == "arm64") {
76 | +      sources += openh264_encoder_sources_asm_arm64
77 | +    }
78 |    }
79 |    include_dirs = openh264_encoder_include_dirs
80 |  
81 | --
82 | 2.25.1
83 | 


--------------------------------------------------------------------------------
/build/patches/prefs-always-prompt-for-download-directory.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Fri, 13 Feb 2015 01:04:21 +0100
 3 | Subject: prefs: always prompt for download directory
 4 | 
 5 | If the user opens a link, one of two things might happen. The URI
 6 | resolves to a "web page" and will be displayed, then everything is
 7 | good. Or it has a MIME type like application/* or so that causes the
 8 | browser to consider it a file download instead.
 9 | 
10 | In that case, one of two things might happen. The browser may display
11 | a dialog box asking explicitly for an action, then everything is
12 | good. Or it does not and instead readily stores the file on disk.
13 | 
14 | (Modern browsers also download the file in the background when waiting
15 | for the dialog box confirmation, but that is a separate tuning knob.)
16 | 
17 | When the file is chosen to be immediately stored on disk without user
18 | interaction, the visual feedback for this may be rather miniscule.
19 | 
20 | And then, you have to open a terminal or file manager again just to
21 | move the file to the location you wanted it to be in in the first
22 | place.
23 | 
24 | TLDR: Do not let files sneak onto the disk too easily.
25 | 
26 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
27 | ---
28 |  chrome/browser/download/download_prefs.cc | 2 +-
29 |  1 file changed, 1 insertion(+), 1 deletion(-)
30 | 
31 | diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
32 | --- a/chrome/browser/download/download_prefs.cc
33 | +++ b/chrome/browser/download/download_prefs.cc
34 | @@ -278,7 +278,7 @@ void DownloadPrefs::RegisterProfilePrefs(
35 |      user_prefs::PrefRegistrySyncable* registry) {
36 |    registry->RegisterBooleanPref(
37 |        prefs::kPromptForDownload,
38 | -      false,
39 | +      true,
40 |        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
41 |    registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, std::string());
42 |    registry->RegisterListPref(prefs::kDownloadExtensionsToOpenByPolicy, {});
43 | --
44 | 2.25.1
45 | 


--------------------------------------------------------------------------------
/build/patches/profile-resetter-disable-send-settings.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Tue, 28 Oct 2014 18:45:19 +0100
 3 | Subject: profile-resetter: disable send-settings
 4 | 
 5 | When the user wishes to reset his preferences, Chromium would suggest
 6 | to send over the old settings to Google. I presume that this is for
 7 | Google to investigate into the setting combinations that led the user
 8 | to issue a rest.
 9 | 
10 | Of course, we cannot let that happen by default. Google is not to get
11 | any information.
12 | 
13 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
14 | ---
15 |  chrome/browser/profile_resetter/reset_report_uploader.cc | 2 +-
16 |  1 file changed, 1 insertion(+), 1 deletion(-)
17 | 
18 | diff --git a/chrome/browser/profile_resetter/reset_report_uploader.cc b/chrome/browser/profile_resetter/reset_report_uploader.cc
19 | --- a/chrome/browser/profile_resetter/reset_report_uploader.cc
20 | +++ b/chrome/browser/profile_resetter/reset_report_uploader.cc
21 | @@ -20,7 +20,7 @@
22 |  
23 |  namespace {
24 |  const char kResetReportUrl[] =
25 | -    "https://sb-ssl.google.com/safebrowsing/clientreport/chrome-reset";
26 | +    "about:blank"; //https://sb-ssl.google.com/safebrowsing/clientreport/chrome-reset";
27 |  
28 |  GURL GetClientReportUrl(const std::string& report_url) {
29 |    GURL url(report_url);
30 | --
31 | 2.25.1
32 | 


--------------------------------------------------------------------------------
/build/patches/sharing-hub-always-use-visible-URL.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sun, 14 Aug 2022 00:53:52 +0200
 3 | Subject: sharing hub: always use visible URL
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../chrome/browser/share/ShareDelegateImpl.java        | 10 ++--------
 8 |  1 file changed, 2 insertions(+), 8 deletions(-)
 9 | 
10 | diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
11 | --- a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
12 | +++ b/chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
13 | @@ -179,14 +179,8 @@ public class ShareDelegateImpl implements ShareDelegate {
14 |  
15 |      @VisibleForTesting
16 |      static boolean shouldFetchCanonicalUrl(final Tab currentTab) {
17 | -        WebContents webContents = currentTab.getWebContents();
18 | -        if (webContents == null) return false;
19 | -        if (webContents.getMainFrame() == null) return false;
20 | -        if (currentTab.getUrl().isEmpty()) return false;
21 | -        if (currentTab.isShowingErrorPage() || SadTab.isShowing(currentTab)) {
22 | -            return false;
23 | -        }
24 | -        return true;
25 | +        // Bromite always uses the visible URL
26 | +	return false;
27 |      }
28 |  
29 |      private static void logCanonicalUrlResult(GURL visibleUrl, GURL canonicalUrl) {
30 | --
31 | 2.25.1
32 | 


--------------------------------------------------------------------------------
/build/patches/translate-disable-fetching-of-languages-from-server.patch:
--------------------------------------------------------------------------------
 1 | From: Simon Eisenmann <simon@struktur.de>
 2 | Date: Mon, 26 Oct 2015 14:18:05 +0100
 3 | Subject: translate: disable fetching of languages from server
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  components/translate/core/browser/translate_language_list.cc | 2 ++
 8 |  1 file changed, 2 insertions(+)
 9 | 
10 | diff --git a/components/translate/core/browser/translate_language_list.cc b/components/translate/core/browser/translate_language_list.cc
11 | --- a/components/translate/core/browser/translate_language_list.cc
12 | +++ b/components/translate/core/browser/translate_language_list.cc
13 | @@ -230,6 +230,7 @@ GURL TranslateLanguageList::TranslateLanguageUrl() {
14 |  }
15 |  
16 |  void TranslateLanguageList::RequestLanguageList() {
17 | +#if 0
18 |    // If resource requests are not allowed, we'll get a callback when they are.
19 |    if (!resource_requests_allowed_) {
20 |      request_pending_ = true;
21 | @@ -259,6 +260,7 @@ void TranslateLanguageList::RequestLanguageList() {
22 |      if (!result)
23 |        NotifyEvent(__LINE__, "Request is omitted due to retry limit");
24 |    }
25 | +#endif
26 |  }
27 |  
28 |  void TranslateLanguageList::SetResourceRequestsAllowed(bool allowed) {
29 | --
30 | 2.25.1
31 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-Gaia.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 12 Feb 2018 21:37:52 +0100
 3 | Subject: ungoogled-chromium: Disable Gaia
 4 | 
 5 | Disables Gaia code.
 6 | Somehow it is still being activated even without being signed-in.
 7 | 
 8 | See also: https://github.com/Eloston/ungoogled-chromium/issues/104
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  google_apis/gaia/gaia_auth_fetcher.cc | 4 +++-
13 |  1 file changed, 3 insertions(+), 1 deletion(-)
14 | 
15 | diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
16 | --- a/google_apis/gaia/gaia_auth_fetcher.cc
17 | +++ b/google_apis/gaia/gaia_auth_fetcher.cc
18 | @@ -40,7 +40,7 @@
19 |  
20 |  namespace {
21 |  
22 | -const size_t kMaxMessageSize = 1024 * 1024;  // 1MB
23 | +//const size_t kMaxMessageSize = 1024 * 1024;  // 1MB
24 |  
25 |  constexpr char kBadAuthenticationError[] = "BadAuthentication";
26 |  constexpr char kBadAuthenticationShortError[] = "badauth";
27 | @@ -267,6 +267,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
28 |      const net::NetworkTrafficAnnotationTag& traffic_annotation) {
29 |    DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
30 |  
31 | +/*
32 |    auto resource_request = std::make_unique<network::ResourceRequest>();
33 |    resource_request->url = gaia_gurl;
34 |    original_url_ = gaia_gurl;
35 | @@ -319,6 +320,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
36 |        base::BindOnce(&GaiaAuthFetcher::OnURLLoadComplete,
37 |                       base::Unretained(this)),
38 |        kMaxMessageSize);
39 | +*/
40 |  }
41 |  
42 |  // static
43 | --
44 | 2.25.1
45 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-Network-Time-Tracker.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 17 Sep 2018 21:50:15 +0200
 3 | Subject: ungoogled-chromium: Disable Network Time Tracker
 4 | 
 5 | This connects to Google to check if the system time is correct when a website certificate
 6 | date seems incorrect, according to https://bugs.chromium.org/p/chromium/issues/detail?id=725232
 7 | 
 8 | Fixes https://github.com/Eloston/ungoogled-chromium/issues/302
 9 | 
10 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
11 | ---
12 |  components/network_time/network_time_tracker.cc | 2 +-
13 |  1 file changed, 1 insertion(+), 1 deletion(-)
14 | 
15 | diff --git a/components/network_time/network_time_tracker.cc b/components/network_time/network_time_tracker.cc
16 | --- a/components/network_time/network_time_tracker.cc
17 | +++ b/components/network_time/network_time_tracker.cc
18 | @@ -296,7 +296,7 @@ void NetworkTimeTracker::UpdateNetworkTime(base::Time network_time,
19 |  }
20 |  
21 |  bool NetworkTimeTracker::AreTimeFetchesEnabled() const {
22 | -  return base::FeatureList::IsEnabled(kNetworkTimeServiceQuerying);
23 | +  return false;
24 |  }
25 |  
26 |  NetworkTimeTracker::FetchBehavior NetworkTimeTracker::GetFetchBehavior() const {
27 | --
28 | 2.25.1
29 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-intranet-detector.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 12 Feb 2018 21:30:30 +0100
 3 | Subject: ungoogled-chromium: Disable intranet detector
 4 | 
 5 | Disables the intranet redirect detector. It generates extra DNS requests and the functionality using this is disabled.
 6 | 
 7 | See this page for more information: https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup
 8 | 
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  chrome/browser/intranet_redirect_detector.cc | 4 +---
12 |  1 file changed, 1 insertion(+), 3 deletions(-)
13 | 
14 | diff --git a/chrome/browser/intranet_redirect_detector.cc b/chrome/browser/intranet_redirect_detector.cc
15 | --- a/chrome/browser/intranet_redirect_detector.cc
16 | +++ b/chrome/browser/intranet_redirect_detector.cc
17 | @@ -119,9 +119,7 @@ void IntranetRedirectDetector::FinishSleep() {
18 |    simple_loaders_.clear();
19 |    resulting_origins_.clear();
20 |  
21 | -  const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
22 | -  if (cmd_line->HasSwitch(switches::kDisableBackgroundNetworking))
23 | -    return;
24 | +  return;
25 |  
26 |    DCHECK(simple_loaders_.empty() && resulting_origins_.empty());
27 |  
28 | --
29 | 2.25.1
30 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-profile-avatar.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 12 Feb 2018 21:29:30 +0100
 3 | Subject: ungoogled-chromium: Disable profile avatar
 4 | 
 5 | Added some Bromite-specific further improvements
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/BUILD.gn                             | 2 --
10 |  chrome/browser/profiles/profile_attributes_entry.cc | 6 ------
11 |  2 files changed, 8 deletions(-)
12 | 
13 | diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
14 | --- a/chrome/browser/BUILD.gn
15 | +++ b/chrome/browser/BUILD.gn
16 | @@ -1448,8 +1448,6 @@ static_library("browser") {
17 |      "profiles/profile_attributes_storage.cc",
18 |      "profiles/profile_attributes_storage.h",
19 |      "profiles/profile_attributes_storage_observer.h",
20 | -    "profiles/profile_avatar_downloader.cc",
21 | -    "profiles/profile_avatar_downloader.h",
22 |      "profiles/profile_avatar_icon_util.cc",
23 |      "profiles/profile_avatar_icon_util.h",
24 |      "profiles/profile_destroyer.cc",
25 | diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc
26 | --- a/chrome/browser/profiles/profile_attributes_entry.cc
27 | +++ b/chrome/browser/profiles/profile_attributes_entry.cc
28 | @@ -336,12 +336,6 @@ std::u16string ProfileAttributesEntry::GetUserName() const {
29 |  gfx::Image ProfileAttributesEntry::GetAvatarIcon(
30 |      int size_for_placeholder_avatar,
31 |      bool use_high_res_file) const {
32 | -  if (IsUsingGAIAPicture()) {
33 | -    const gfx::Image* image = GetGAIAPicture();
34 | -    if (image)
35 | -      return *image;
36 | -  }
37 | -
38 |  #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
39 |    // TODO(crbug.com/1100835): After launch, remove the treatment of placeholder
40 |    // avatars from GetHighResAvatar() and from any other places.
41 | --
42 | 2.25.1
43 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-untraceable-URLs.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 12 Feb 2018 21:28:11 +0100
 3 | Subject: ungoogled-chromium: Disable untraceable URLs
 4 | 
 5 | Disable additional URLs that are not caught by the "trk" scheme
 6 | 
 7 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 8 | ---
 9 |  chrome/browser/android/rlz/rlz_ping_handler.cc | 2 +-
10 |  rlz/lib/financial_ping.cc                      | 4 ++--
11 |  rlz/lib/lib_values.cc                          | 1 -
12 |  rlz/lib/lib_values.h                           | 1 -
13 |  4 files changed, 3 insertions(+), 5 deletions(-)
14 | 
15 | diff --git a/chrome/browser/android/rlz/rlz_ping_handler.cc b/chrome/browser/android/rlz/rlz_ping_handler.cc
16 | --- a/chrome/browser/android/rlz/rlz_ping_handler.cc
17 | +++ b/chrome/browser/android/rlz/rlz_ping_handler.cc
18 | @@ -76,7 +76,7 @@ void RlzPingHandler::Ping(
19 |    DCHECK_EQ(id.length(), 50u);
20 |  
21 |    GURL request_url(base::StringPrintf(
22 | -      "https://%s%s?", rlz_lib::kFinancialServer, rlz_lib::kFinancialPingPath));
23 | +      "about:blank"));
24 |    request_url = net::AppendQueryParameter(
25 |        request_url, rlz_lib::kProductSignatureCgiVariable, "chrome");
26 |    request_url =
27 | diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc
28 | --- a/rlz/lib/financial_ping.cc
29 | +++ b/rlz/lib/financial_ping.cc
30 | @@ -336,7 +336,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
31 |  
32 |    // Open network connection.
33 |    InternetHandle connection_handle = InternetConnectA(inet_handle,
34 | -      kFinancialServer, kFinancialPort, "", "", INTERNET_SERVICE_HTTP,
35 | +      "about:blank", kFinancialPort, "", "", INTERNET_SERVICE_HTTP,
36 |        INTERNET_FLAG_NO_CACHE_WRITE, 0);
37 |    if (!connection_handle)
38 |      return PING_FAILURE;
39 | @@ -380,7 +380,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
40 |    return PING_SUCCESSFUL;
41 |  #else
42 |    std::string url =
43 | -      base::StringPrintf("https://%s%s", kFinancialServer, request);
44 | +      base::StringPrintf("about:blank");
45 |  
46 |    // Use a waitable event to cause this function to block, to match the
47 |    // wininet implementation.
48 | diff --git a/rlz/lib/lib_values.cc b/rlz/lib/lib_values.cc
49 | --- a/rlz/lib/lib_values.cc
50 | +++ b/rlz/lib/lib_values.cc
51 | @@ -40,7 +40,6 @@ const char kSetDccResponseVariable[] = "set_dcc";
52 |  //
53 |  
54 |  const char kFinancialPingPath[] = "/tools/pso/ping";
55 | -const char kFinancialServer[]   = "clients1.google.com";
56 |  const int kFinancialPort = 443;
57 |  
58 |  // Ping times in 100-nanosecond intervals.
59 | diff --git a/rlz/lib/lib_values.h b/rlz/lib/lib_values.h
60 | --- a/rlz/lib/lib_values.h
61 | +++ b/rlz/lib/lib_values.h
62 | @@ -72,7 +72,6 @@ extern const char kSetDccResponseVariable[];
63 |  //
64 |  
65 |  extern const char kFinancialPingPath[];
66 | -extern const char kFinancialServer[];
67 |  
68 |  extern const int kFinancialPort;
69 |  
70 | --
71 | 2.25.1
72 | 


--------------------------------------------------------------------------------
/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Mon, 12 Feb 2018 21:21:36 +0100
 3 | Subject: ungoogled-chromium: Disable webRTC log uploader
 4 | 
 5 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 6 | ---
 7 |  .../media/webrtc/webrtc_log_uploader.cc       | 28 ++++---------------
 8 |  1 file changed, 6 insertions(+), 22 deletions(-)
 9 | 
10 | diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
11 | --- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
12 | +++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
13 | @@ -126,28 +126,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
14 |    DCHECK(meta_data.get());
15 |    DCHECK(!upload_done_data.paths.directory.empty());
16 |  
17 | -  std::string compressed_log = CompressLog(log_buffer.get());
18 | -
19 | -  std::string local_log_id;
20 | -
21 | -  if (base::PathExists(upload_done_data.paths.directory)) {
22 | -    webrtc_logging::DeleteOldWebRtcLogFiles(upload_done_data.paths.directory);
23 | -
24 | -    local_log_id = base::NumberToString(base::Time::Now().ToDoubleT());
25 | -    base::FilePath log_file_path =
26 | -        upload_done_data.paths.directory.AppendASCII(local_log_id)
27 | -            .AddExtension(FILE_PATH_LITERAL(".gz"));
28 | -    WriteCompressedLogToFile(compressed_log, log_file_path);
29 | -
30 | -    base::FilePath log_list_path =
31 | -        webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory(
32 | -            upload_done_data.paths.directory);
33 | -    AddLocallyStoredLogInfoToUploadListFile(log_list_path, local_log_id);
34 | -  }
35 | -
36 | -  upload_done_data.local_log_id = local_log_id;
37 | -  PrepareMultipartPostData(compressed_log, std::move(meta_data),
38 | -                           std::move(upload_done_data));
39 | +  NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", std::move(upload_done_data));
40 |  }
41 |  
42 |  void WebRtcLogUploader::PrepareMultipartPostData(
43 | @@ -158,6 +137,11 @@ void WebRtcLogUploader::PrepareMultipartPostData(
44 |    DCHECK(!compressed_log.empty());
45 |    DCHECK(meta_data.get());
46 |  
47 | +  if ((true)) {
48 | +    NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", std::move(upload_done_data));
49 | +    return;
50 | +  }
51 | +
52 |    std::unique_ptr<std::string> post_data(new std::string());
53 |    SetupMultipart(post_data.get(), compressed_log,
54 |                   upload_done_data.paths.incoming_rtp_dump,
55 | --
56 | 2.25.1
57 | 


--------------------------------------------------------------------------------
/build/patches/updater-disable-updater-pings.patch:
--------------------------------------------------------------------------------
 1 | From: Jan Engelhardt <jengelh@inai.de>
 2 | Date: Tue, 2 Jun 2015 11:01:50 +0200
 3 | Subject: updater: disable updater pings
 4 | 
 5 | Despite auto-updater being arguably disabled (see previous commit),
 6 | Chromium would still send background requests. Kill it.
 7 | (trk:170, trk:171)
 8 | 
 9 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
10 | ---
11 |  .../component_updater/component_updater_url_constants.cc     | 4 ++--
12 |  components/component_updater/configurator_impl.cc            | 5 +----
13 |  components/component_updater/configurator_impl.h             | 1 -
14 |  3 files changed, 3 insertions(+), 7 deletions(-)
15 | 
16 | diff --git a/components/component_updater/component_updater_url_constants.cc b/components/component_updater/component_updater_url_constants.cc
17 | --- a/components/component_updater/component_updater_url_constants.cc
18 | +++ b/components/component_updater/component_updater_url_constants.cc
19 | @@ -15,9 +15,9 @@ namespace component_updater {
20 |  // The value of |kDefaultUrlSource| can be overridden with
21 |  // --component-updater=url-source=someurl.
22 |  const char kUpdaterJSONDefaultUrl[] =
23 | -    "https://update.googleapis.com/service/update2/json";
24 | +    "about:blank";
25 |  
26 |  const char kUpdaterJSONFallbackUrl[] =
27 | -    "http://update.googleapis.com/service/update2/json";
28 | +    "about:blank";
29 |  
30 |  }  // namespace component_updater
31 | diff --git a/components/component_updater/configurator_impl.cc b/components/component_updater/configurator_impl.cc
32 | --- a/components/component_updater/configurator_impl.cc
33 | +++ b/components/component_updater/configurator_impl.cc
34 | @@ -45,8 +45,7 @@ ConfiguratorImpl::ConfiguratorImpl(
35 |      : background_downloads_enabled_(config_policy.BackgroundDownloadsEnabled()),
36 |        deltas_enabled_(config_policy.DeltaUpdatesEnabled()),
37 |        fast_update_(config_policy.FastUpdate()),
38 | -      pings_enabled_(config_policy.PingsEnabled()),
39 | -      require_encryption_(require_encryption),
40 | +      pings_enabled_(false),
41 |        url_source_override_(config_policy.UrlSourceOverride()),
42 |        initial_delay_(config_policy.InitialDelay()) {
43 |    if (config_policy.TestRequest()) {
44 | @@ -81,8 +80,6 @@ std::vector<GURL> ConfiguratorImpl::UpdateUrl() const {
45 |  
46 |    std::vector<GURL> urls{GURL(kUpdaterJSONDefaultUrl),
47 |                           GURL(kUpdaterJSONFallbackUrl)};
48 | -  if (require_encryption_)
49 | -    update_client::RemoveUnsecureUrls(&urls);
50 |  
51 |    return urls;
52 |  }
53 | diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h
54 | --- a/components/component_updater/configurator_impl.h
55 | +++ b/components/component_updater/configurator_impl.h
56 | @@ -105,7 +105,6 @@ class ConfiguratorImpl {
57 |    const bool deltas_enabled_;
58 |    const bool fast_update_;
59 |    const bool pings_enabled_;
60 | -  const bool require_encryption_;
61 |    const GURL url_source_override_;
62 |    const double initial_delay_;
63 |  };
64 | --
65 | 2.25.1
66 | 


--------------------------------------------------------------------------------
/build/patches/webRTC-do-not-expose-local-IP-addresses.patch:
--------------------------------------------------------------------------------
 1 | From: csagan5 <32685696+csagan5@users.noreply.github.com>
 2 | Date: Sat, 9 May 2020 14:42:37 +0200
 3 | Subject: webRTC: do not expose local IP addresses
 4 | 
 5 | Prevent leaks of local IP address and public IP address (when using VPN)
 6 | 
 7 | See also:
 8 | * https://github.com/bromite/bromite/issues/553
 9 | * https://github.com/bromite/bromite/issues/589
10 | 
11 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
12 | ---
13 |  chrome/browser/ui/browser_ui_prefs.cc                       | 2 +-
14 |  .../peerconnection/peer_connection_dependency_factory.cc    | 6 ++++--
15 |  2 files changed, 5 insertions(+), 3 deletions(-)
16 | 
17 | diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
18 | --- a/chrome/browser/ui/browser_ui_prefs.cc
19 | +++ b/chrome/browser/ui/browser_ui_prefs.cc
20 | @@ -93,7 +93,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
21 |                                  false);
22 |  #endif
23 |    registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
24 | -                               blink::kWebRTCIPHandlingDefault);
25 | +                               blink::kWebRTCIPHandlingDisableNonProxiedUdp);
26 |    registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
27 |    registry->RegisterBooleanPref(prefs::kWebRtcEventLogCollectionAllowed, false);
28 |    registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
29 | diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
30 | --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
31 | +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
32 | @@ -105,7 +105,9 @@ WebRTCIPHandlingPolicy GetWebRTCIPHandlingPolicy(const String& preference) {
33 |      return kDefaultPublicInterfaceOnly;
34 |    if (preference == kWebRTCIPHandlingDisableNonProxiedUdp)
35 |      return kDisableNonProxiedUdp;
36 | -  return kDefault;
37 | +  if (preference == kWebRTCIPHandlingDefault)
38 | +    return kDefault;
39 | +  return kDisableNonProxiedUdp;
40 |  }
41 |  
42 |  bool IsValidPortRange(uint16_t min_port, uint16_t max_port) {
43 | @@ -791,7 +793,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
44 |            break;
45 |        }
46 |  
47 | -      VLOG(3) << "WebRTC routing preferences: "
48 | +      LOG(INFO) << "WebRTC routing preferences: "
49 |                << "policy: " << policy
50 |                << ", multiple_routes: " << port_config.enable_multiple_routes
51 |                << ", nonproxied_udp: " << port_config.enable_nonproxied_udp
52 | --
53 | 2.25.1
54 | 


--------------------------------------------------------------------------------
/build/patches/webview-Hard-no-to-persistent-histograms.patch:
--------------------------------------------------------------------------------
 1 | From: "Kevin F. Haggerty" <haggertk@lineageos.org>
 2 | Date: Sun, 27 Dec 2020 09:42:54 -0700
 3 | Subject: webview: Hard no to persistent histograms
 4 | 
 5 | * It's probably some kind of bug somewhere that these are never
 6 |   deleted, but they don't really add value to us in the first
 7 |   place.
 8 | * Stop eating 4MB every single time any app that uses webview
 9 |   ever opens.
10 | * These were guarded by a feature check before
11 |   https://chromium.googlesource.com/chromium/src/+/b86102f2a243
12 | 
13 | License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
14 | ---
15 |  android_webview/browser/aw_field_trials.cc | 5 -----
16 |  1 file changed, 5 deletions(-)
17 | 
18 | diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browser/aw_field_trials.cc
19 | --- a/android_webview/browser/aw_field_trials.cc
20 | +++ b/android_webview/browser/aw_field_trials.cc
21 | @@ -11,9 +11,4 @@
22 |  #include "components/metrics/persistent_histograms.h"
23 |  
24 |  void AwFieldTrials::SetUpFieldTrials() {
25 | -  // Persistent histograms must be enabled as soon as possible.
26 | -  base::FilePath metrics_dir;
27 | -  if (base::PathService::Get(base::DIR_ANDROID_APP_DATA, &metrics_dir)) {
28 | -    InstantiatePersistentHistograms(metrics_dir);
29 | -  }
30 |  }
31 | --
32 | 2.25.1
33 | 


--------------------------------------------------------------------------------
/build/ruleset_converter.gn_args:
--------------------------------------------------------------------------------
 1 | android_channel="stable"
 2 | blink_symbol_level=1
 3 | build_contextual_search=false
 4 | build_with_tflite_lib=false
 5 | chrome_pgo_phase=0
 6 | dcheck_always_on=false
 7 | dfmify_dev_ui=false
 8 | disable_android_lint=true
 9 | disable_autofill_assistant_dfm=true
10 | disable_fieldtrial_testing_config=true
11 | disable_tab_ui_dfm=true
12 | enable_av1_decoder=true
13 | enable_dav1d_decoder=true
14 | enable_gvr_services=false
15 | enable_hangout_services_extension=false
16 | enable_iterator_debugging=false
17 | enable_mdns=false
18 | enable_mse_mpeg2ts_stream_parser=true
19 | enable_nacl=false
20 | enable_platform_dolby_vision=true
21 | enable_platform_hevc=true
22 | enable_remoting=false
23 | enable_reporting=false
24 | enable_vr=false
25 | exclude_unwind_tables=false
26 | ffmpeg_branding="Chrome"
27 | icu_use_data_file=true
28 | is_cfi=true
29 | is_component_build=false
30 | is_debug=false
31 | is_official_build=true
32 | proprietary_codecs=true
33 | rtc_build_examples=false
34 | safe_browsing_mode=0
35 | symbol_level=1
36 | system_webview_package_name="com.android.webview"
37 | target_os="linux"
38 | treat_warnings_as_errors=true
39 | use_cfi_cast=true
40 | use_debug_fission=true
41 | use_errorprone_java_compiler=false
42 | use_gnome_keyring=false
43 | use_official_google_api_keys=false
44 | use_qt=false
45 | use_rtti=false
46 | use_stable_package_name_for_trichrome=false
47 | use_sysroot=false
48 | webview_includes_weblayer=false
49 | 


--------------------------------------------------------------------------------
/csagan5.asc:
--------------------------------------------------------------------------------
 1 | -----BEGIN PGP PUBLIC KEY BLOCK-----
 2 | Version: GnuPG v2
 3 | 
 4 | mQENBFphnJwBCAC1qSMaPR5Nq9sEHa9ZePwoGLFafjOBcApz7IYW7dIsQYXVUHlo
 5 | lbBwwfFUjnnIf/wzZ42ck/QGRKJ18qA9VybWyT8as0Sz26Tmxah31vI7kzlBZCYY
 6 | /ZER5N3onQFVVVoynYxmep5HdK7enAXOtLBOogbJ/x2Q9ITPuJ+Pv3b4R5E2ui/i
 7 | hFAruUh+oifPBzh3fjBTTr0uvDqbsnsczQptFghKxYyJiPTblCD51Ou11a3uNt1y
 8 | PuG1bR5jImgt33T6zjdFac6kQ2Zalxa/URU/FQPiYJ1X2J1jCgdEgRKlK70ha+oN
 9 | mnVWhFzjecuCw180HCZh1OQho+LPWbtMFyvtABEBAAG0M2NzYWdhbjUgPDMyNjg1
10 | Njk2K2NzYWdhbjVAdXNlcnMubm9yZXBseS5naXRodWIuY29tPokBIgQTAQgAFgUC
11 | WmGcnAkQZBkKUdhdwMUCGwsCGQEAADpDB/4zlnDg1gToKqtz994jLzUM7PJOPTWa
12 | c8xGCj7l8BpGcCOK0fk7fOQ+bDYT0OSHZ1OCR7Gbm6ENu03wNLQ7W9Tr0uf/yDIP
13 | mItcFk6nYmMKPnK6bd7QWLMsT9mK6mYb02zt6Ql8D7EsWGxifQVQG85ETObhoSqw
14 | EH6zqZvflxJLmN+vh/Orm1ipzEvw7cjvpSloDwypjY6x9MGEE9utFcGySx726gKu
15 | Wmz417QZc/TpylCd1p72G9pCqv1Si+y+P9tSEdjWSM6EqEwMr5W+IJ1O6BZQ7A9p
16 | 0l2FZqYC2WkRDJZqWiYoYltP6z1SEbbVI5rQaaVAesS1Ae8OOR9EmlK8
17 | =6Hsd
18 | -----END PGP PUBLIC KEY BLOCK-----
19 | 


--------------------------------------------------------------------------------