Compare commits

...

56 Commits

Author SHA1 Message Date
wukko 8c7b2012a9 revision: bump to 8 2025-07-13 23:27:58 +06:00
wukko fe261284a0 helium/ui/layout-constants: fix avatar chip insets 2025-07-13 23:09:07 +06:00
wukko 4439e6c91b helium/ui: fix avatar button bg colors in toolbar
normal state no longer has a background and guest state is way more bearable now
2025-07-13 23:08:38 +06:00
wukko 6e8168f3bc helium/ui: remove broken side panel separator
but keep the rounded corner :3
2025-07-13 21:03:19 +06:00
wukko 3f97be7852 helium/ui: reduce split view padding & align everything 2025-07-13 21:02:35 +06:00
wukko 8136fa3543 helium/ui: revamped top container ui 2025-07-13 19:46:44 +06:00
wukko e379f406e5 revision: bump to 7 2025-07-11 23:21:53 +06:00
wukko 7a02f2ac4b helium/settings: fix expression in translate patch 2025-07-11 22:09:38 +06:00
wukko 3a8dcfc49f helium/ui: new tab design
- tabs are now narrower and shorter
- split view tabs are wider to accommodate for two tabs in one component
- tabs are now attached to the toolbar
- close button now appears only on hover/focus
- fixed tab closing animation, close button no longer slides along with the rest of the tab
- new tab button no longer interferes with the tab separator
2025-07-11 21:59:26 +06:00
wukko 2f1884b2e5 helium/ui: transparent address bar and thinner toolbar 2025-07-11 21:42:18 +06:00
wukko 49e177c717 revision: bump to 6 2025-07-11 01:52:51 +06:00
wukko 21f7d239c9 patches: refresh for 138.0.7204.100 2025-07-11 00:43:27 +06:00
wukko 56d91da258 merge: update to ungoogled-chromium 138.0.7204.100 2025-07-10 22:20:03 +06:00
Blaise d945d574c6 Update CI config, scripts, and docs for python 3.10 2025-07-10 06:49:41 -05:00
jj d06b7de006 helium: add flag for setting energy saver fps 2025-07-09 22:19:31 +00:00
Blaise cff0ad9d51 Update to Chromium 138.0.7204.100 2025-07-08 13:57:01 -05:00
jj c27928ab4a revision: bump to 5 2025-07-06 19:18:32 +00:00
jj 3fa437ef53 helium/updater-prefs: change macos appcast url
this is easier to proxy
2025-07-05 15:39:10 +00:00
wukko 13d630288f revision: bump to 4 2025-07-05 16:25:00 +06:00
wukko d2021bb3ef helium/settings/about-page: remove learn more links 2025-07-04 23:00:01 +06:00
wukko a5b8806ff9 revision: bump to 3 2025-07-04 19:11:16 +06:00
wukko 62467f9b12 patches: refresh for 138.0.7204.96 2025-07-04 18:59:16 +06:00
wukko e8355e7d7c merge: update to ungoogled-chromium 138.0.7204.96 2025-07-04 18:29:15 +06:00
jj 15c3d58053 revision: bump to 2 2025-07-04 11:15:25 +00:00
jj e2f0519286 helium/settings: reenable update progress ui 2025-07-02 21:05:23 +00:00
jj 566f20b5ed helium: add preference to control fetching updates
configurable on mac only for now
2025-07-02 21:05:06 +00:00
jj 2fa5711cea helium: add update channel flag 2025-07-02 21:05:05 +00:00
jj c653aeb93b patches/versioning: include full version in CFBundleVersion 2025-07-02 21:04:47 +00:00
wukko eb50fd7139 settings: remove safety hub entry points
cuz they don't work
2025-07-02 19:48:24 +06:00
wukko be70b704a2 settings: remove translate section 2025-07-02 19:34:46 +06:00
wukko 8f98e3eac5 helium/core: fix tab sync unreached error
TabGroupSyncServiceProxy::OnTabSelected() is not implemented upstream
2025-07-02 18:48:07 +06:00
wukko 457da2ea74 helium/core/add-native-bangs: use VLOG() instead of LOG() 2025-07-02 18:45:37 +06:00
wukko c471f52d54 helium/core/split-view: remove mini toolbar 2025-07-02 18:45:10 +06:00
wukko 8d01b7d62f helium/core: don't disable tab groups in bookmark bar
cuz it results in an empty bookmark bar if you make a tab group and then close it without removing it
2025-07-02 18:44:38 +06:00
wukko 51aaf38e8d helium/core: remove google spellcheck from context menu 2025-07-02 18:44:00 +06:00
networkException d35f39cd85 Update to Chromium 138.0.7204.96 2025-06-30 23:33:03 +02:00
implicitfield e5f27a9138 Add a flag to increase the storage quota for Incognito/Guest profiles 2025-06-27 13:10:44 -05:00
implicitfield f7e6d2273d Remove the F1 shortcut 2025-06-27 13:10:44 -05:00
jj 8900b76f0b patches: refresh for 138.0.7204.49 2025-06-27 18:05:22 +00:00
Qian Qian "Qubik"‎ 15ee44b5a9 docs: Update Homebrew Cask Name
Signed-off-by: Qian Qian "Qubik"‎ <qubik65536@qubik65536.top>
2025-06-27 10:09:11 -04:00
jj 37da72130f update_lists: remove generate_search_engine_icons from sub list
gone upstream
2025-06-26 19:33:31 +00:00
jj 4d6fdeb156 merge: update to ungoogled-chromium 138.0.7204.49 2025-06-26 19:33:10 +00:00
Damir Modyarov 28823a634b utils/name_substitution: use utf-8 encoding when opening locale files 2025-06-25 00:14:23 +03:00
Blaise dad7e19df0 Update to Chromium 138.0.7204.49 2025-06-24 15:00:12 -05:00
Blaise 9a900f1e48 Update to Chromium 137.0.7151.119 2025-06-17 15:59:17 -05:00
wukko 672c986f28 repo: update README and remove unrelated upstream docs 2025-06-13 15:26:41 +06:00
wukko 6305ef215f revision: bump to 5 2025-06-13 11:14:46 +06:00
wukko 58f6aa1135 patches: refresh for 137.0.7151.104 2025-06-13 11:14:28 +06:00
networkException 483d84e481 LICENSE: Bump the year to 2025 for a complete decade
Happy Birthday ungoogled-chromium!

See 9456dad229 for the initial
commit, 10 years ago today :^)
2025-06-12 18:42:06 +02:00
wukko dbe7963624 merge: update to chromium 137.0.7151.104 2025-06-12 22:13:52 +06:00
Blaise 47bc6ecca7 Update to Chromium 137.0.7151.103 2025-06-10 16:19:42 -05:00
wukko ebb0cb88e4 revision: bump to 4 2025-06-05 23:17:54 +06:00
wukko 71cd486eaf patches/series: add split view patch
forgot to stage this
2025-06-05 18:55:21 +06:00
wukko bf26fa3e96 helium/core/split-view: fix spacing, backport code, enable by default
& also fix text color in empty state
2025-06-05 18:52:50 +06:00
wukko e1f2182e90 helium/core: remove "read later" from tab's context menu 2025-06-05 18:50:41 +06:00
networkException dbb383d84e Update to Chromium 137.0.7151.68 2025-06-03 01:47:13 +02:00
180 changed files with 2595 additions and 2642 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ container:
code_check_task:
pip_cache:
folder: /usr/local/lib/python3.9/site-packages
folder: /usr/local/lib/python3.10/site-packages
fingerprint_script: cat .cirrus_requirements.txt
populate_script: pip install -r .cirrus_requirements.txt
utils_script:
@@ -26,7 +26,7 @@ validate_config_task:
validate_with_source_task:
pip_cache:
folder: /usr/local/lib/python3.9/site-packages
folder: /usr/local/lib/python3.10/site-packages
fingerprint_script: cat .cirrus_requirements.txt
populate_script: pip install -r .cirrus_requirements.txt
chromium_download_script: |
+1 -1
View File
@@ -1,5 +1,5 @@
# Dockerfile for Python 3 with xz-utils (for tar.xz unpacking)
FROM python:3.9-slim-bullseye
FROM python:3.10-slim-bookworm
RUN apt update && apt install -y xz-utils patch axel curl git
+9 -9
View File
@@ -1,9 +1,9 @@
# Based on Python package versions in Debian bullseye
# https://packages.debian.org/bullseye/python/
astroid==2.5.1 # via pylint
pylint==2.7.2
pytest-cov==2.10.1
pytest==6.0.2
httplib2==0.18.1
requests==2.25.1
yapf==0.30.0
# Based on Python package versions in Debian bookworm
# https://packages.debian.org/bookworm/python/
astroid==2.14.2 # via pylint
pylint==2.16.2
pytest-cov==4.0.0
pytest==7.2.1
httplib2==0.20.4
requests==2.28.1
yapf==0.32.0
-101
View File
@@ -1,101 +0,0 @@
name: Bug Report
description: Report a bug building or running ungoogled-chromium
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Before submitting this issue, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support)
Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first
- type: dropdown
id: os
attributes:
label: OS/Platform
description: OS/Platform you are running ungoogled-chromium on
options:
- Android
- Arch Linux
- Debian, Ubuntu, and derivatives
- Fedora and CentOS
- Gentoo
- GNU Guix
- macOS
- NixOS
- Other Linux (please specify)
- Portable Linux
- Slackware
- Windows
validations:
required: true
- type: dropdown
id: install
attributes:
label: Installed
description: How was ungoogled-chromium installed on your OS/Platform
options:
- Compiled from source
- OS/Platform's package manager
- Flatpak
- https://ungoogled-software.github.io/ungoogled-chromium-binaries/
- Other (please use 'Additional context' field below to mention how exactly)
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: ungoogled-chromium version. Could be copied from chrome://settings/help
validations:
required: true
- type: checkboxes
attributes:
label: Have you tested that this is not an upstream issue or an issue with your configuration?
options:
- label: I have tried reproducing this issue in Chrome and it could not be reproduced there
- label: I have tried reproducing this issue in vanilla Chromium and it could not be reproduced there
- label: I have tried reproducing this issue in ungoogled-chromium with a new and empty profile using `--user-data-dir` command line argument and it could not be reproduced there
- type: input
id: description
attributes:
label: Description
description: A clear and concise description (in one line) of what the bug is
validations:
required: true
- type: textarea
id: repro
attributes:
label: How to Reproduce?
description: Steps to reproduce the behaviour
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behaviour
description: A clear and concise description of what happens
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: A clear and concise description of what you expected to happen
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: sh
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the problem here. If applicable, add screenshots to help explain your problem.
@@ -1,18 +0,0 @@
---
name: Create an "Updating to Chromium x.x.x.x"
about: For letting the community track progress to a new stable Chromium
title: Updating to Chromium {{ env.VERSION }} on {{ env.PLATFORM }}
labels: update
assignees: ''
---
Chromium stable channel for {{ env.PLATFORM }} has been updated to a newer version: {{ env.VERSION }}.
If you are willing to work on updating the patches and lists, please leave a comment in this issue in order to facilitate better coordination and avoid wasted/duplicated efforts.
If you'd like to increase visibility of your progress or get early feedback/advice, consider creating a [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). Finally, make sure to reference this issue in your PR. Please make sure to read [/docs/developing.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/docs/developing.md#updating-patches) for guidance.
Feel free to raise issues or questions throughout the process here. However, please refrain from asking for ETAs unless no visible progress has been made here or in the developer's PR for a while (e.g. 2 weeks).
{{ env.NOTIFY_MAINTAINERS }}
@@ -1,47 +0,0 @@
name: Feature request
description: Suggest an idea
labels: ["enhancement", "help wanted"]
body:
- type: markdown
attributes:
value: |
Before submitting this feature request, please confirm if you should submit it to a [platform-specific issue tracker instead](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md#platform-specific-support)
Otherwise, your issue may not be noticed. In addition, please read through the [SUPPORT.md](https://github.com/ungoogled-software/ungoogled-chromium/blob/master/SUPPORT.md) first
- type: input
id: description
attributes:
label: Description
description: A clear and concise description (in one line) of what your suggestion is
validations:
required: true
- type: checkboxes
attributes:
label: Who's implementing?
options:
- label: I'm willing to implement this feature myself
- type: textarea
id: prob
attributes:
label: The problem
description: Please describe the problem you are solving or new feature you're suggesting
placeholder: I'm always frustrated when [...] happens
validations:
required: true
- type: textarea
id: sol
attributes:
label: Possible solutions
description: Please describe possible solution(-s) to The Problem
validations:
required: true
- type: textarea
id: alt
attributes:
label: Alternatives
description: Please describe alternatives you've considered, if any
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context about the feature request here
-1
View File
@@ -1 +0,0 @@
*(Please ensure you have read SUPPORT.md and docs/contributing.md before submitting the Pull Request)*
-1
View File
@@ -1 +0,0 @@
* @ungoogled-software/core
+25 -172
View File
@@ -1,185 +1,38 @@
# ungoogled-chromium
# Helium
Bullshit-free web browser, based on Chromium. Follows [imput](https://github.com/imputnet)'s ethics and norms.
*A lightweight approach to removing Google web service dependency*
Very WIP, not meant for public/end user consumption, etc.
**Help is welcome!** See the [docs/contributing.md](docs/contributing.md) document for more information.
First and foremost, we're making a good browser for ourselves.
We don't intend to reinvent the wheel or target everyone, it isn't Helium's goal.
The main goal is to provide an honest, comfortable, privacy-respecting, and non-invasive experience.
If you don't like it - you don't like it, that's totally okay, and we don't care.
## Objectives
There's a lot more to Helium, but we don't have a complete set of features yet.
We'll update the documentation when we're closer to a public release!
In descending order of significance (i.e. most important objective first):
1. **ungoogled-chromium is Google Chromium, sans dependency on Google web services**.
2. **ungoogled-chromium retains the default Chromium experience as closely as possible**. Unlike other Chromium forks that have their own visions of a web browser, ungoogled-chromium is essentially a drop-in replacement for Chromium.
3. **ungoogled-chromium features tweaks to enhance privacy, control, and transparency**. However, almost all of these features must be manually activated or enabled. For more details, see [Feature Overview](#feature-overview).
In scenarios where the objectives conflict, the objective of higher significance should take precedence.
## Content Overview
* [Objectives](#objectives)
* [Motivation and Philosophy](#motivation-and-philosophy)
* [Feature Overview](#feature-overview)
* [**Downloads**](#downloads)
* [Source Code](#source-code)
* [**FAQ**](#faq)
* [Building Instructions](#building-instructions)
* [Design Documentation](#design-documentation)
* [**Contributing, Reporting, Contacting**](#contributing-reporting-contacting)
* [Credits](#credits)
* [Related Projects](#related-projects)
* [License](#license)
## Motivation and Philosophy
Without signing in to a Google Account, Chromium does pretty well in terms of security and privacy. However, Chromium still has some dependency on Google web services and binaries. In addition, Google designed Chromium to be easy and intuitive for users, which means they compromise on transparency and control of internal operations.
ungoogled-chromium addresses these issues in the following ways:
1. Remove all remaining background requests to any web services while building and running the browser
2. Remove all code specific to Google web services
3. Remove all uses of pre-made binaries from the source code, and replace them with user-provided alternatives when possible.
4. Disable features that inhibit control and transparency, and add or modify features that promote them (these changes will almost always require manual activation or enabling).
These features are implemented as configuration flags, patches, and custom scripts. For more details, consult the [Design Documentation](docs/design.md).
## Feature Overview
*This section overviews the features of ungoogled-chromium. For more detailed information, it is best to consult the source code.*
Contents of this section:
* [Key Features](#key-features)
* [Enhancing Features](#enhancing-features)
* [Borrowed Features](#borrowed-features)
* [Supported Platforms and Distributions](#supported-platforms-and-distributions)
### Key Features
*These are the core features introduced by ungoogled-chromium.*
* Disable functionality specific to Google domains (e.g. Google Host Detector, Google URL Tracker, Google Cloud Messaging, Google Hotwording, etc.)
* This includes disabling [Safe Browsing](https://en.wikipedia.org/wiki/Google_Safe_Browsing). Consult [the FAQ for the rationale](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq#why-is-safe-browsing-disabled).
* Block internal requests to Google at runtime. This feature is a fail-safe measure for the above, in case Google changes or introduces new components that our patches do not disable. This feature is implemented by replacing many Google web domains in the source code with non-existent alternatives ending in `qjz9zk` (known as domain substitution; [see docs/design.md](docs/design.md#source-file-processors) for details), then [modifying Chromium to block its own requests with such domains](patches/core/ungoogled-chromium/block-trk-and-subdomains.patch). In other words, no connections are attempted to the `qjz9zk` domain.
* Strip binaries from the source code (known as binary pruning; [see docs/design.md](docs/design.md#source-file-processors) for details)
### Enhancing Features
*These are the non-essential features introduced by ungoogled-chromium.*
* Add many new command-line switches and `chrome://flags` entries to configure new features (which are disabled by default). See [docs/flags.md](docs/flags.md) for the exhaustive list.
* Add *Suggestions URL* text field in the search engine editor (`chrome://settings/searchEngines`) for customizing search engine suggestions.
* Add more URL schemes allowed to save page schemes.
* Add Omnibox search provider "No Search" to allow disabling of searching
* Add a custom cross-platform build configuration and packaging wrapper for Chromium. It currently supports many Linux distributions, macOS, and Windows. (See [docs/design.md](docs/design.md) for details on the system.)
* Force all pop-ups into tabs
* Disable automatic formatting of URLs in Omnibox (e.g. stripping `http://`, hiding certain parameters)
* Disable intranet redirect detector (extraneous DNS requests)
* This breaks captive portal detection, but captive portals still work.
* (Iridium Browser feature change) Prevent URLs with the `trk:` scheme from connecting to the Internet
* Also prevents any URLs with the top-level domain `qjz9zk` (as used in domain substitution) from attempting a connection.
* (Windows-specific) Do not set the Zone Identifier on downloaded files
### Borrowed Features
In addition to the features introduced by ungoogled-chromium, ungoogled-chromium selectively borrows many features from the following projects (in approximate order of significance):
* [Inox patchset](https://github.com/gcarq/inox-patchset)
* [Bromite](https://github.com/bromite/bromite)
* [Debian](https://tracker.debian.org/pkg/chromium)
* [Iridium Browser](https://iridiumbrowser.de/)
### Supported Platforms and Distributions
[See docs/platforms.md for a list of supported platforms](docs/platforms.md).
Other platforms are discussed and tracked in this repository's Issue Tracker. Learn more about using the Issue Tracker under the section [Contributing, Reporting, Contacting](#contributing-reporting-contacting).
## Downloads
### Automated or maintained builds
ungoogled-chromium is available in the following **software repositories**:
* Arch: Available in the AUR, [see instructions in ungoogled-chromium-archlinux](https://github.com/ungoogled-software/ungoogled-chromium-archlinux)
* Debian & Ubuntu: Available in OBS, find your [distribution specific instructions](https://github.com/ungoogled-software/ungoogled-chromium-debian) in the Installing section
* Fedora: Available in [COPR](https://copr.fedorainfracloud.org/coprs/) as [`wojnilowicz/ungoogled-chromium`](https://copr.fedorainfracloud.org/coprs/wojnilowicz/ungoogled-chromium/). Also available in [RPM Fusion](https://rpmfusion.org/Configuration) as `chromium-browser-privacy` (outdated).
* Gentoo: Available in [`::pf4public`](https://github.com/PF4Public/gentoo-overlay) overlay as [`ungoogled-chromium`](https://github.com/PF4Public/gentoo-overlay/tree/master/www-client/ungoogled-chromium) and [`ungoogled-chromium-bin`](https://github.com/PF4Public/gentoo-overlay/tree/master/www-client/ungoogled-chromium-bin) ebuilds
* [OpenMandriva](https://openmandriva.org/) includes ungoogled-chromium as its main browser. The `chromium` package includes all ungoogling patches.
* macOS: Available in [Homebrew](https://brew.sh/) as [`eloston-chromium`](https://formulae.brew.sh/cask/eloston-chromium). Just run `brew install --cask eloston-chromium`. Chromium will appear in your `/Applications` directory.
* FreeBSD: Available in pkg as [`www/ungoogled-chromium`](https://www.freshports.org/www/ungoogled-chromium/).
If your GNU/Linux distribution is not listed, there are distro-independent builds available via the following **package managers**:
* Flatpak: Available [in the Flathub repo](https://flathub.org/apps/details/io.github.ungoogled_software.ungoogled_chromium) as `io.github.ungoogled_software.ungoogled_chromium`
* GNU Guix: Available as `ungoogled-chromium`
* NixOS/nixpkgs: Available as `ungoogled-chromium`
### Third-party binaries
If your operating system is not listed above, you can also try to [**Download binaries from here**](https://ungoogled-software.github.io/ungoogled-chromium-binaries/)
*NOTE: These binaries are provided by anyone who are willing to build and submit them. Because these binaries are not necessarily [reproducible](https://reproducible-builds.org/), authenticity cannot be guaranteed; In other words, there is always a non-zero probability that these binaries may have been tampered with. In the unlikely event that this has happened to you, please [report it in a new issue](#contributing-reporting-contacting).*
These binaries are known as **contributor binaries**.
## Source Code
This repository only contains the common code for all platforms; it does not contain all the configuration and scripts necessary to build ungoogled-chromium. Most users will want to use platform-specific repos, where all the remaining configuration and scripts are provided for specific platforms:
[**Find the repo for a specific platform here**](docs/platforms.md).
If you wish to include ungoogled-chromium code in your own build process, consider using [the tags in this repo](https://github.com/ungoogled-software/ungoogled-chromium/tags). These tags follow the format `{chromium_version}-{revision}` where
* `chromium_version` is the version of Chromium used in `x.x.x.x` format, and
* `revision` is a number indicating the version of ungoogled-chromium for the corresponding Chromium version.
Additionally, most platform-specific repos extend their tag scheme upon this one.
**Building the source code**: [See docs/building.md](docs/building.md)
### Mirrors
List of mirrors:
* [Codeberg](https://codeberg.org): [main repo](https://codeberg.org/ungoogled-software/ungoogled-chromium) and [ungoogled-software](https://codeberg.org/ungoogled-software)
## FAQ
[See the frequently-asked questions (FAQ) on the Wiki](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq)
## Building Instructions
[See docs/building.md](docs/building.md)
## Design Documentation
[See docs/design.md](docs/design.md)
## Contributing, Reporting, Contacting
* For reporting and contacting, see [SUPPORT.md](SUPPORT.md)
* If you're willing to help, check out the [Issue Tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues) and especially issues, which [need help](https://github.com/ungoogled-software/ungoogled-chromium/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
* For contributing (e.g. how to help, submitting changes, criteria for new features), see [docs/contributing.md](docs/contributing.md)
* If you have some small contributions that don't fit our criteria, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead.
## Platform-specific packaging
At the moment, we're only working on [Helium for macOS](https://github.com/imputnet/helium-macos).
We plan to create packaging for Windows & Linux systems in the future, but that's over the horizon for now.
## Credits
### ungoogled-chromium
Helium is proudly based on [ungoogled-chromium](https://github.com/ungoogled-software/ungoogled-chromium).
It wouldn't be possible for us to get rid of Google's bloat and get a development+building pipeline this fast without it.
Huge shout-out to everyone behind this amazing project!
(and we intend to contribute even more stuff upstream in the future)
* [The Chromium Project](https://www.chromium.org/)
* [Inox patchset](https://github.com/gcarq/inox-patchset)
* [Debian](https://tracker.debian.org/pkg/chromium-browser)
* [Bromite](https://github.com/bromite/bromite)
* [Iridium Browser](https://iridiumbrowser.de/)
* The users for testing and debugging, [contributing code](https://github.com/ungoogled-software/ungoogled-chromium/graphs/contributors), providing feedback, or simply using ungoogled-chromium in some capacity.
### The Chromium project
[The Chromium Project](https://www.chromium.org/) is obviously at the core of Helium,
making it possible to exist in the first place.
## Related Projects
List of known projects that fork or use changes from ungoogled-chromium:
* [Bromite](https://github.com/bromite/bromite) (Borrows some patches. Features builds for Android)
* [ppc64le fork](https://github.com/leo-lb/ungoogled-chromium) (Fork with changes to build for ppc64le CPUs)
### ungoogled-chromium's dependencies
- [Inox patchset](https://github.com/gcarq/inox-patchset)
- [Debian](https://tracker.debian.org/pkg/chromium-browser)
- [Bromite](https://github.com/bromite/bromite)
- [Iridium Browser](https://iridiumbrowser.de/)
## License
All code, patches, modified portions of imported code or patches, and
any other content that is unique to Helium and not imported from other
repositories is licensed under GPL-3.0. See [LICENSE](LICENSE).
-30
View File
@@ -1,30 +0,0 @@
# Support
**Before you submit feedback, please ensure you have tried the following**:
* Read the [FAQ](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq)
* If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section first.
* Check if your feedback already exists in the [Issue Tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues) (make sure to search closed issues and use search filters, as applicable)
* If this is a problem, ensure it does *not* occur with regular Chromium or Google Chrome. If it does, then this is *not* a problem with ungoogled-chromium. Instead, please submit your feedback to the [Chromium bug tracker](https://bugs.chromium.org/p/chromium/issues/list) or Google.
* Read the documentation under [docs/](docs/)
There are a few channels for support:
* An issue tracker. Issue trackers are the main hubs for discussions and development activity, and thus the primary means of support. They includes problems, suggestions, and questions. If you are using a build for an officially-supported platform ([see the list here](docs/platforms.md)), then please refer to the [Platform-specific Support](#platform-specific-support) section to find its issue tracker. Otherwise, please use [the main issue tracker](https://github.com/ungoogled-software/ungoogled-chromium/issues).
* A chat room. There are two options available:
* [Gitter](https://gitter.im/ungoogled-software/Lobby). It can use your GitHub account as an identity.
* Matrix.org under name `ungoogled-software/lobby`. It has a bidirectional connection with Gitter.
## Platform-specific Support
For officially-supported platforms, **please visit their issue trackers before using the issue tracker in this repository**:
* Android: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-android/issues)
* Arch Linux and derivatives (e.g. Manjaro): [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues)
* Debian & Ubuntu: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-debian/issues)
* Fedora & CentOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-fedora/issues)
* Flatpak: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-flatpak/issues)
* Gentoo ([@PF4Public](https://github.com/PF4Public)'s overlay): [Issue tracker](https://github.com/PF4Public/gentoo-overlay/issues?q=is%3Aissue++ungoogled-chromium+)
* macOS: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-macos/issues)
* Portable Linux: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/issues)
* Windows: [Issue tracker](https://github.com/ungoogled-software/ungoogled-chromium-windows/issues)
+1 -1
View File
@@ -1 +1 @@
137.0.7151.69
138.0.7204.100
+1
View File
@@ -21,6 +21,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from downloads import DownloadInfo, schema
sys.path.pop(0)
+1 -2
View File
@@ -27,8 +27,7 @@ def main():
Path(input_name).read_text(encoding='UTF-8').splitlines()))
for file_name in file_iter:
if not Path(args.root_dir, file_name).exists():
print('ERROR: Path "{}" from file "{}" does not exist.'.format(
file_name, input_name),
print(f'ERROR: Path "{file_name}" from file "{input_name}" does not exist.',
file=sys.stderr)
sys.exit(1)
+1
View File
@@ -21,6 +21,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger
sys.path.pop(0)
+1
View File
@@ -24,6 +24,7 @@ from third_party import unidiff
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger, parse_series # pylint: disable=wrong-import-order
sys.path.pop(0)
# File suffixes to ignore for checking unused patches
+1 -2
View File
@@ -23,7 +23,6 @@ def main():
disables = [
'wrong-import-position',
'bad-continuation',
'duplicate-code',
]
@@ -33,7 +32,7 @@ def main():
disables.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disables)),
f"--disable={','.join(disables)}",
'--jobs=4',
'--score=n',
'--persistent=n',
+5 -5
View File
@@ -18,6 +18,7 @@ class ChangeDir:
"""
Changes directory to path in with statement
"""
def __init__(self, path):
self._path = path
self._orig_path = os.getcwd()
@@ -31,12 +32,12 @@ class ChangeDir:
def run_pylint(module_path, pylint_options, ignore_prefixes=tuple()):
"""Runs Pylint. Returns a boolean indicating success"""
pylint_stats = Path('/run/user/{}/pylint_stats'.format(os.getuid()))
pylint_stats = Path(f'/run/user/{os.getuid()}/pylint_stats')
if not pylint_stats.parent.is_dir(): #pylint: disable=no-member
pylint_stats = Path('/run/shm/pylint_stats')
os.environ['PYLINTHOME'] = str(pylint_stats)
input_paths = list()
input_paths = []
if not module_path.exists():
print('ERROR: Cannot find', module_path)
sys.exit(1)
@@ -75,12 +76,11 @@ def main():
args = parser.parse_args()
if not args.module_path.exists():
print('ERROR: Module path "{}" does not exist'.format(args.module_path))
print(f'ERROR: Module path "{args.module_path}" does not exist')
sys.exit(1)
disables = [
'wrong-import-position',
'bad-continuation',
]
if args.hide_fixme:
@@ -89,7 +89,7 @@ def main():
disables.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disables)),
f"--disable={','.join(disables)}",
'--jobs=4',
'--score=n',
'--persistent=n',
+5 -8
View File
@@ -21,21 +21,18 @@ def main():
help='Show "locally-disabled" Pylint warnings.')
args = parser.parse_args()
disable = ['bad-continuation']
if args.hide_fixme:
disable.append('fixme')
if not args.show_locally_disabled:
disable.append('locally-disabled')
pylint_options = [
'--disable={}'.format(','.join(disable)),
'--jobs=4',
'--max-args=7',
'--score=n',
'--persistent=n',
]
if args.hide_fixme:
pylint_options.append('--disable=fixme')
if not args.show_locally_disabled:
pylint_options.append('--disable=locally-disabled')
ignore_prefixes = [
('third_party', ),
('tests', ),
+6 -3
View File
@@ -11,11 +11,13 @@ import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
from _common import get_logger, set_logging_level
from _common import ENCODING, get_logger, set_logging_level
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from check_patch_files import check_series_duplicates
sys.path.pop(0)
@@ -33,7 +35,7 @@ def test_check_series_duplicates():
'a.patch',
'b.patch',
'c.patch',
]))
]), encoding=ENCODING)
assert not check_series_duplicates(patches_dir)
get_logger().info('Check duplicates')
@@ -42,7 +44,8 @@ def test_check_series_duplicates():
'b.patch',
'c.patch',
'a.patch',
]))
]),
encoding=ENCODING)
assert check_series_duplicates(patches_dir)
+5 -3
View File
@@ -11,11 +11,13 @@ import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
from _common import get_logger, set_logging_level
from _common import ENCODING, get_logger, set_logging_level
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
import validate_patches
sys.path.pop(0)
@@ -30,8 +32,8 @@ def test_test_patches():
def _run_test_patches(patch_content):
with tempfile.TemporaryDirectory() as tmpdirname:
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content)
Path(tmpdirname, 'test.patch').write_text(patch_content)
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content, encoding=ENCODING)
Path(tmpdirname, 'test.patch').write_text(patch_content, encoding=ENCODING)
_, patch_cache = validate_patches._load_all_patches(series_iter, Path(tmpdirname))
required_files = validate_patches._get_required_files(patch_cache)
files_under_test = validate_patches._retrieve_local_files(required_files,
+3 -3
View File
@@ -28,6 +28,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import get_logger
from domain_substitution import DomainRegexList, TREE_ENCODINGS
from prune_binaries import CONTINGENT_PATHS
sys.path.pop(0)
# Encoding for output files
@@ -119,7 +120,6 @@ DOMAIN_EXCLUDE_PREFIXES = [
# Exclusion to allow download of sysroots
'build/linux/sysroot_scripts/sysroots.json',
# Google Web Store extension stuff
'tools/search_engine_choice/generate_search_engine_icons.py',
'extensions/common/api/_api_features.json',
'chrome/common/extensions/api/_api_features.json',
'extensions/common/extension_urls.cc',
@@ -399,9 +399,9 @@ def main(args_list=None):
args.tree,
DomainRegexList(args.domain_regex).search_regex, args.processes)
with args.pruning.open('w', encoding=_ENCODING) as file_obj:
file_obj.writelines('%s\n' % line for line in pruning_set)
file_obj.writelines(f'{line}\n' for line in pruning_set)
with args.domain_substitution.open('w', encoding=_ENCODING) as file_obj:
file_obj.writelines('%s\n' % line for line in domain_substitution_set)
file_obj.writelines(f'{line}\n' for line in domain_substitution_set)
if unused_patterns.log_unused(args.error_unused) and args.error_unused:
get_logger().error('Please update or remove unused patterns and/or prefixes. '
'The lists have still been updated with the remaining valid entries.')
+4 -3
View File
@@ -22,6 +22,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from _common import ENCODING, get_logger
from patches import merge_patches
sys.path.pop(0)
_SERIES = 'series'
@@ -114,14 +115,14 @@ def unmerge_platform_patches(platform_patches_dir):
return False
orig_series = (platform_patches_dir / _SERIES_ORIG).read_text(encoding=ENCODING).splitlines()
# patch path -> list of lines after patch path and before next patch path
path_comments = dict()
path_comments = {}
# patch path -> inline comment for patch
path_inline_comments = dict()
path_inline_comments = {}
previous_path = None
for partial_path in orig_series:
if not partial_path or partial_path.startswith('#'):
if partial_path not in path_comments:
path_comments[previous_path] = list()
path_comments[previous_path] = []
path_comments[previous_path].append(partial_path)
else:
path_parts = partial_path.split(' #', maxsplit=1)
+29 -28
View File
@@ -23,12 +23,14 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent / 'third_party'))
import unidiff
from unidiff.constants import LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE
sys.path.pop(0)
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
from domain_substitution import TREE_ENCODINGS
from _common import ENCODING, get_logger, get_chromium_version, parse_series, add_common_params
from patches import dry_run_check
sys.path.pop(0)
try:
@@ -38,6 +40,7 @@ try:
class _VerboseRetry(urllib3.util.Retry):
"""A more verbose version of HTTP Adatper about retries"""
def sleep_for_retry(self, response=None):
"""Sleeps for Retry-After, and logs the sleep time"""
if response:
@@ -100,16 +103,16 @@ class _DepsNodeVisitor(ast.NodeVisitor):
def visit_Call(self, node): #pylint: disable=invalid-name
"""Override Call syntax handling"""
if node.func.id not in self._allowed_callables:
raise _UnexpectedSyntaxError('Unexpected call of "%s" at line %s, column %s' %
(node.func.id, node.lineno, node.col_offset))
raise _UnexpectedSyntaxError(f'Unexpected call of "{node.func.id}" '
f'at line {node.lineno}, column {node.col_offset}')
def generic_visit(self, node):
for ast_type in self._valid_syntax_types:
if isinstance(node, ast_type):
super().generic_visit(node)
return
raise _UnexpectedSyntaxError('Unexpected {} at line {}, column {}'.format(
type(node).__name__, node.lineno, node.col_offset))
raise _UnexpectedSyntaxError(f'Unexpected {type(node).__name__} '
f'at line {node.lineno}, column {node.col_offset}')
def _validate_deps(deps_text):
@@ -124,6 +127,7 @@ def _validate_deps(deps_text):
def _deps_var(deps_globals):
"""Return a function that implements DEPS's Var() function"""
def _var_impl(var_name):
"""Implementation of Var() in DEPS"""
return deps_globals['vars'][var_name]
@@ -145,8 +149,8 @@ def _download_googlesource_file(download_session, repo_url, version, relative_pa
googlesource.com repo as a string.
"""
if 'googlesource.com' not in repo_url:
raise ValueError('Repository URL is not a googlesource.com URL: {}'.format(repo_url))
full_url = repo_url + '/+/{}/{}?format=TEXT'.format(version, str(relative_path))
raise ValueError(f'Repository URL is not a googlesource.com URL: {repo_url}')
full_url = repo_url + f'/+/{version}/{str(relative_path)}?format=TEXT'
get_logger().debug('Downloading: %s', full_url)
response = download_session.get(full_url)
if response.status_code == 404:
@@ -172,13 +176,13 @@ def _get_dep_value_url(deps_globals, dep_value):
# Probably a Python format string
url = url.format(**deps_globals['vars'])
if url.count('@') != 1:
raise _PatchValidationError('Invalid number of @ symbols in URL: {}'.format(url))
raise _PatchValidationError(f'Invalid number of @ symbols in URL: {url}')
return url
def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths):
"""Helper for _get_child_deps_tree"""
for dep_path_str, dep_value in deps_globals.get('deps', dict()).items():
for dep_path_str, dep_value in deps_globals.get('deps', {}).items():
url = _get_dep_value_url(deps_globals, dep_value)
if url is None:
continue
@@ -200,7 +204,7 @@ def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_re
grandchild_deps_tree = recursedeps_item_depsfile
if grandchild_deps_tree is None:
# This dep is not recursive; i.e. it is fully loaded
grandchild_deps_tree = dict()
grandchild_deps_tree = {}
child_deps_tree[dep_path] = (*url.split('@'), grandchild_deps_tree)
@@ -211,7 +215,7 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
# Load unloaded DEPS
deps_globals = _parse_deps(
_download_googlesource_file(download_session, repo_url, version, child_deps_tree))
child_deps_tree = dict()
child_deps_tree = {}
current_deps_tree[child_path] = (repo_url, version, child_deps_tree)
deps_use_relative_paths = deps_globals.get('use_relative_paths', False)
_process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths)
@@ -221,9 +225,8 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
def _get_last_chromium_modification():
"""Returns the last modification date of the chromium-browser-official tar file"""
with _get_requests_session() as session:
response = session.head(
'https://storage.googleapis.com/chromium-browser-official/chromium-{}.tar.xz'.format(
get_chromium_version()))
response = session.head('https://storage.googleapis.com/chromium-browser-official/'
f'chromium-{get_chromium_version()}.tar.xz')
response.raise_for_status()
return email.utils.parsedate_to_datetime(response.headers['Last-Modified'])
@@ -235,7 +238,7 @@ def _get_gitiles_git_log_date(log_entry):
def _get_gitiles_commit_before_date(repo_url, target_branch, target_datetime):
"""Returns the hexadecimal hash of the closest commit before target_datetime"""
json_log_url = '{repo}/+log/{branch}?format=JSON'.format(repo=repo_url, branch=target_branch)
json_log_url = f'{repo_url}/+log/{target_branch}?format=JSON'
with _get_requests_session() as session:
response = session.get(json_log_url)
response.raise_for_status()
@@ -410,7 +413,7 @@ def _retrieve_remote_files(file_iter):
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
"""
files = dict()
files = {}
root_deps_tree = _initialize_deps_tree()
@@ -459,7 +462,7 @@ def _retrieve_local_files(file_iter, source_dir):
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
"""
files = dict()
files = {}
for file_path in file_iter:
try:
raw_content = (source_dir / file_path).read_bytes()
@@ -473,7 +476,7 @@ def _retrieve_local_files(file_iter, source_dir):
except UnicodeDecodeError:
continue
if not content:
raise UnicodeDecodeError('Unable to decode with any encoding: %s' % file_path)
raise UnicodeDecodeError(f'Unable to decode with any encoding: {file_path}')
files[file_path] = content.split('\n')
if not files:
get_logger().error('All files used by patches are missing!')
@@ -488,7 +491,7 @@ def _modify_file_lines(patched_file, file_lines):
for hunk in patched_file:
# Validate hunk will match
if not hunk.is_valid():
raise _PatchValidationError('Hunk is not valid: {}'.format(repr(hunk)))
raise _PatchValidationError(f'Hunk is not valid: {repr(hunk)}')
line_cursor = hunk.target_start - 1
for line in hunk:
normalized_line = line.value.rstrip('\n')
@@ -497,18 +500,16 @@ def _modify_file_lines(patched_file, file_lines):
line_cursor += 1
elif line.is_removed:
if normalized_line != file_lines[line_cursor]:
raise _PatchValidationError(
"Line '{}' does not match removal line '{}' from patch".format(
file_lines[line_cursor], normalized_line))
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
f"removal line '{normalized_line}' from patch")
del file_lines[line_cursor]
elif line.is_context:
if not normalized_line and line_cursor == len(file_lines):
# We reached the end of the file
break
if normalized_line != file_lines[line_cursor]:
raise _PatchValidationError(
"Line '{}' does not match context line '{}' from patch".format(
file_lines[line_cursor], normalized_line))
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
f"context line '{normalized_line}' from patch")
line_cursor += 1
else:
assert line.line_type in (LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE)
@@ -592,7 +593,7 @@ def _load_all_patches(series_iter, patches_dir):
- dict of relative UNIX path strings to unidiff.PatchSet
"""
had_failure = False
unidiff_dict = dict()
unidiff_dict = {}
for relative_path in series_iter:
if relative_path in unidiff_dict:
continue
@@ -682,12 +683,12 @@ def main():
if args.cache_remote.parent.exists():
args.cache_remote.mkdir()
else:
parser.error('Parent of cache path {} does not exist'.format(args.cache_remote))
parser.error(f'Parent of cache path {args.cache_remote} does not exist')
if not args.series.is_file():
parser.error('--series path is not a file or not found: {}'.format(args.series))
parser.error(f'--series path is not a file or not found: {args.series}')
if not args.patches.is_dir():
parser.error('--patches path is not a directory or not found: {}'.format(args.patches))
parser.error(f'--patches path is not a directory or not found: {args.patches}')
series_iterable = tuple(parse_series(args.series))
had_failure, patch_cache = _load_all_patches(series_iterable, args.patches)
-76
View File
@@ -1,76 +0,0 @@
# Building ungoogled-chromium
The recommended way to build ungoogled-chromium is by consulting [the repository for your supported platform (links here)](platforms.md).
* *Linux users*: If your distribution is not listed, you will need to use Portable Linux.
If you want to add ungoogled-chromium to your existing Chromium build process, see the next section. Additionally, you may reference the repositories for supported platforms for inspiration.
## Integrating ungoogled-chromium into your Chromium build process
Typically, ungoogled-chromium is built from [code in platform-specific repositories](platforms.md). However, ungoogled-chromium can also be included in part or in whole into any custom Chromium build. In this section, **we will assume you already have a process to make your own Chromium builds**.
**NOTE**: You may need additional patches and/or build configuration for [your supported platform](platforms.md) because this repository does not contain all the code necessary for all platforms.
Before continuing, you may find it helpful to have a look through [the design documentation](design.md).
The following procedure outline the essential steps to build Chromium will all of ungoogled-chromium's features. **They are not sufficient to build ungoogled-chromium on their own**.
1. Ensure Chromium is downloaded, such as by `depot_tools`. In most of our supported platforms, we instead use a custom tool to do this.
```sh
mkdir -p build/download_cache
./utils/downloads.py retrieve -c build/download_cache -i downloads.ini
./utils/downloads.py retrieve -c build/download_cache -i extras.ini
./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src
./utils/downloads.py unpack -c build/download_cache -i extras.ini -- build/src
```
2. Prune binaries
```sh
./utils/prune_binaries.py build/src pruning.list
```
3. Apply patches
```sh
./utils/patches.py apply build/src patches
```
4. Substitute domains and names
```sh
./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src
python3 ./utils/name_substitution.py" --sub -t build/src
```
5. Build GN. If you are using `depot_tools` to checkout Chromium or you already have a GN binary, you should skip this step.
```sh
mkdir -p build/src/out/Default
cd build/src
./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/
```
6. Invoke the build:
```
mkdir -p build/src/out/Default
# NOTE: flags.gn contains only a subset of what is needed to run the build.
cp flags.gn build/src/out/Default/args.gn
cd build/src
# If you have additional GN flags to add, make sure to add them now.
./out/Default/gn gen out/Default --fail-on-unused-args
ninja -C out/Default chrome chromedriver chrome_sandbox
```
## Building FAQ
### My build keeps crashing because I run out of RAM! How can I fix it?
Here are several ways to address this, in decreasing order of preference:
1. Decrease the number of parallel threads to Ninja (the `-j` flag)
2. Add swap space
-52
View File
@@ -1,52 +0,0 @@
# Contributing
This document contains our criteria and guidelines for contributing to ungoogled-chromium.
If you have **small contributions that don't fit our criteria**, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead.
If you are a developer of an **officially-supported platform**, be sure to check out the [Platform Repository Standards and Guidelines](repo_management.md).
List of contents:
* [How to help](#how-to-help)
* [Submitting changes](#submitting-changes)
* [Criteria for new features](#criteria-for-new-features)
### How to help
Generally, ungoogled-chromium needs contributors to help:
* Keep up-to-date with the latest stable Chromium, and any problematic changes in the new version that needs modification.
* Help with issues marked with the `help wanted` tag (usually either questions for other users, or request for help from other developers)
* Review Pull Requests from other contributors
* Implement feature requests ("enhancements" in the Issue Tracker), large or small.
* Implement issues marked with the `backlog` tag (that are closed).
* If it requires new code, please read through the [Submitting changes](#submitting-changes) section below.
In addition, anyone is free to help others in need of support in the Issue Tracker.
If there are fixes, tweaks, or additions you want to make, continue onto the following section.
### Submitting changes
Please submit all changes via Pull Requests.
Guidelines:
* You are welcome to submit minor changes, such as bug fixes, documentation fixes, and tweaks.
* If your change has an associated issue, please let others know that you are working on it.
* If you want to submit a new feature, please read through the [Criteria for new features](#criteria-for-new-features) below.
* When in doubt about the acceptance of a change, you are welcome to ask via an issue first.
### Criteria for new features
1. New features should not detract from the default Chromium experience, unless it falls under the project's main objectives (i.e. removing Google integration and enhancing privacy).
* For larger features, please propose them via an issue first.
2. New features should live behind a setting that is **off by default**.
* Settings are usually added via a command-line flag and `chrome://flags` entries. See [the relevant section in docs/developing.md](developing.md#adding-command-line-flags-and-chromeflags-options) for more information.
* Unless there are significant benefits, adding the setting to `chrome://settings` is *not recommended* due to the additional maintenance required (caused by the infrastructure that backs preferences).
**NOTE**: In the event that the codebase changes significantly for a non-essential patch (i.e. a patch that does not contribute to the main objectives of ungoogled-chromium), it will be removed until someone updates it.
-20
View File
@@ -1,20 +0,0 @@
# Default Settings
Vanilla Chromium settings are not often changed by ungoogled-chromium, however there are some exceptions.
Below is a list of the documented changes to the default Chromium settings.
Setting | New State | Location
-- | -- | --
Allow sites to check if you have payment methods saved | Disabled | chrome://settings/payments
Ask where to save each file before downloading | Enabled | chrome://settings/downloads
Auto sign-in | Disabled | chrome://settings/passwords
Block third-party cookies | Enabled | chrome://settings/cookies
Continue running background apps when Chromium is closed | Disabled | chrome://settings/system
Hyperlink auditing (\<a ping>) | Disabled | NA
Link Doctor | Disabled | NA
Offer to save passwords | Disabled | chrome://settings/passwords
Payment autofill | Disabled | chrome://settings/payments
Preload pages | Disabled | chrome://settings/cookies
Search suggestions | Disabled | chrome://settings/syncSetup
Show bookmark bar | Enabled | chrome://settings/appearance
WebRTC IP handling policy | Disable Non-Proxied UDP | `--webrtc-ip-handling-policy`
-118
View File
@@ -1,118 +0,0 @@
# Design
This document contains a high-level technical description of ungoogled-chromium and its components.
## Overview
ungoogled-chromium consists of the following major components:
* [Configuration](#configuration)
* [Configuration files](#configuration-files)
* [Source file processors](#source-file-processors)
* [Patches](#patches)
* [Packaging](#packaging)
The following sections describe each component.
## Configuration
Configuration is a broad term that refers to patches, build flags, and metadata about Chromium source code. It consists of the following components:
* [Configuration files](#configuration-files)
* [Source file processors](#source-file-processors)
* [Patches](#patches)
The following sections describe each component in more depth.
### Configuration Files
Configuration files (or config files) are files that store build configuration and source code changes for a build.
**IMPORTANT**: For consistency, all config files must be encoded in UTF-8.
List of configuration files:
* `chromium_version.txt` - The Chromium version used by ungoogled-chromium
* `revision.txt` - The revision of the changes on top of the given Chromium version.
* `pruning.list` - [See the Source File Processors section](#source-file-processors)
* `domain_regex.list` - [See the Source File Processors section](#source-file-processors)
* `domain_substitution.list` - [See the Source File Processors section](#source-file-processors)
* `downloads.ini` - Archives to download and unpack into the buildspace tree. This includes code not bundled in the Chromium source code archive that is specific to a non-Linux platform. On platforms such as macOS, this also includes a pre-built LLVM toolchain for convenience (which can be removed and built from source if desired).
* `flags.gn` - GN arguments to set before building.
### Source File Processors
Source file processors are utilities that directly manipulate the Chromium source tree before building. Currently, there are two such utilities: binary pruning, and domain substitution.
**Binary Pruning**: Strips binaries from the source code. This includes pre-built executables, shared libraries, and other forms of machine code. Most are substituted with system or user-provided equivalents, or are built from source; those binaries that cannot be removed do not contain machine code.
The list of files to remove are determined by the config file `pruning.list`. This config file is generated by `devutils/update_lists.py`.
**Domain Substitution**: Replaces Google and several other web domain names in the Chromium source code with non-existent alternatives ending in `qjz9zk`. These changes are mainly used as a backup measure to detect potentially unpatched requests to Google. Note that domain substitution is a crude process, and *may not be easily undone*.
With a few patches from ungoogled-chromium, any requests with these domain names sent via `net::URLRequest` in the Chromium code are blocked and notify the user via a info bar.
Similar to binary pruning, the list of files to modify are listed in `domain_substitution.list`; it is also updated with `devutils/update_lists.py`.
The regular expressions to use are listed in `domain_regex.list`; the search and replacement expressions are delimited with a pound (`#`) symbol. The restrictions for the entries are as follows:
* All replacement expressions must end in the TLD `qjz9zk`.
* The search and replacement expressions must have a one-to-one correspondence: no two search expressions can match the same string, and no two replacement expressions can result in the same string.
### Patches
All of ungoogled-chromium's patches for the Chromium source code are located in `patches/`. This directory conforms to the default GNU Quilt format. That is:
* All patches must reside inside `patches/`
* There is a `patches/series` text file that defines the order to apply all the patches. These patches are listed as a relative path from the `patches` directory.
* Lines starting with the pound symbol (`#`) are ignored
* For lines with patch paths: If there is a space followed by a pound symbol, the text after the patch path will be ignored.
All patch files in ungoogled-chromium must satisfy these formatting requirements:
* Patch filenames must end with the extension `.patch`
* The content must be in [unified format](https://en.wikipedia.org/wiki/Diff_utility#Unified_format).
* All paths in the hunk headers must begin after the first slash (which corresponds to the argument `-p1` for GNU patch).
* All patches must apply cleanly (i.e. no fuzz).
* It is recommended that hunk paths have the `a/` and `b/` prefixes, and a context of 3 (like the git default).
* All patches must be encoded in UTF-8 (i.e. same encoding as config files).
Patches are categorized into two directories directly under `patches/`:
1. **core**: Changes regarding background requests, code specific to Google web services, or code using pre-made binaries. They must be kept up-to-date with all of the changes in Chromium.
2. **extra**: Changes to features regarding control and transparency. They are not guaranteed to persist across updates to Chromium.
Within each category, patches are grouped by the following:
* `debian/` - Patches from Debian's Chromium
* Patches are not modified unless they conflict with Inox's patches
* These patches are not Debian-specific. For those, see the `debian/patches` directory
* `inox-patchset/` - Contains a modified subset of patches from Inox patchset.
* Some patches such as those that change branding are omitted
* Patches are not modified unless they do not apply cleanly onto the version of Chromium being built
* Patches are from [inox-patchset's GitHub](https://github.com/gcarq/inox-patchset)
* [Inox patchset's license](https://github.com/gcarq/inox-patchset/blob/master/LICENSE)
* `bromite/` - Patches from [Bromite](https://github.com/bromite/bromite)
* `iridium-browser/` - Contains a modified subset of patches from Iridium Browser.
* Some patches such as those that change branding or URLs to point to Iridium's own servers are omitted
* Patches are not modified unless they conflict with Debian's or Inox's patches
* Patches are from the `patchview` branch of Iridium's Git repository. [Git webview of the patchview branch](https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/?h=patchview)
* `opensuse/` - Patches from openSUSE's Chromium
* `ubuntu/` - Patches from Ubuntu's Chromium
* `ungoogled-chromium/` - Patches by ungoogled-chromium developers
## Packaging
Packaging is the process of downloading, building, and producing a distributable package of ungoogled-chromium.
Packaging files use the code from this repository to build ungoogled-chromium. Each platform and configuration has an associated packaging repository under the [ungoogled-software](https://github.com/ungoogled-software) organization. For more information about each packaging repository, see the [building documentation](building.md).
Packaging generally consists of the major steps:
1. Download and unpack the source tree
2. Prune binaries
3. Apply patches
4. Substitute domains
5. Build GN via `tools/gn/bootstrap/bootstrap.py`
6. Run `gn gen` with the GN flags
7. Build Chromium via `ninja`
8. Create package(s) of build output (usually in `out/Default`)
-90
View File
@@ -1,90 +0,0 @@
# Development notes and procedures
This document contains an assortment of information for those who want to develop ungoogled-chromium.
Information targeted towards developers *and* other users live in [the Wiki](https://ungoogled-software.github.io/ungoogled-chromium-wiki/).
Contents:
* [Branches](#branches)
* [Adding command-line flags and chrome://flags options](#adding-command-line-flags-and-chromeflags-options)
* [Workflow of updating to a new Chromium version](#workflow-of-updating-to-a-new-chromium-version)
## Branches
Development is focused on `master`, and any changes in there should not break anything unless platforms break during a Chromium version rebase.
Larger feature changes or hotfixes must be done in a separate branch. Once they are ready, then a Pull Request can be made onto `master` (for contributors with write access, merging directly via a git client is fine). After the branch is merged, it should be removed.
## Adding command-line flags and `chrome://flags` options
See `docs/how_to_add_your_feature_flag.md` in the Chromium source tree for the steps needed. Note that updating `tools/metrics/histograms/enums.xml` is not required.
For new flags, first add a constant to `third_party/ungoogled/ungoogled_switches.cc` (by modifying patch `resources/patches/ungoogled-chromium/add-third-party-ungoogled.patch`). Then, use this constant in the steps outlined above.
## Workflow of updating to a new Chromium version
Tested on Debian 10 (buster). Exact instructions should work on any other Linux or macOS system with the proper dependencies.
To gain a deeper understanding of this updating process, have a read through [docs/design.md](design.md).
### Dependencies
* [`quilt`](http://savannah.nongnu.org/projects/quilt)
* This is available in most (if not all) Linux distributions, and also Homebrew on macOS.
* This utility facilitates most of the updating process, so it is important to learn how to use this. The manpage for quilt (as of early 2017) lacks an example of a workflow. There are multiple guides online, but [this guide from Debian](https://wiki.debian.org/UsingQuilt) and [the referenced guide on that page](https://raphaelhertzog.com/2012/08/08/how-to-use-quilt-to-manage-patches-in-debian-packages/) are the ones referenced in developing the current workflow.
* Python 3.9 or newer
* `httplib2` and `six` are also required if you wish to utilize a source clone instead of the source tarball.
### Downloading the source code
```sh
./utils/clone.py -o build/src
```
### Updating lists
The utility `devutils/update_lists.py` automates this process. By default, it will update the files in the local repo. Pass in `-h` or `--help` for available options.
```sh
./devutils/update_lists.py -t build/src
```
The resulting source tree in `build/src` *will not* have binaries pruned or domains substituted.
### Updating patches
**IMPORTANT**: Make sure domain substitution has not been applied before updating patches.
1. Run `source devutils/set_quilt_vars.sh` (or `source devutils/set_quilt_vars.fish` if you are using the fish shell)
* This will setup quilt to modify patches directly in `patches/`
2. Go into the source tree: `cd build/src`
3. Use `quilt` to refresh all patches: `quilt push -a --refresh`
* If an error occurs, go to the next step. Otherwise, skip to Step 5.
4. Use `quilt` to fix the broken patch:
1. Run `quilt push -f`
2. Edit the broken files as necessary by adding (`quilt edit ...` or `quilt add ...`) or removing (`quilt remove ...`) files as necessary
* When removing large chunks of code, remove each line instead of using language features to hide or remove the code. This makes the patches less susceptible to breakages when using quilt's refresh command (e.g. quilt refresh updates the line numbers based on the patch context, so it's possible for new but desirable code in the middle of the block comment to be excluded.). It also helps with readability when someone wants to see the changes made based on the patch alone.
3. Refresh the patch: `quilt refresh`
4. Go back to Step 3.
5. Run `quilt pop -a`
6. Go back to ungoogled-chromium repo: `cd ../..`
7. Run `devutils/validate_config.py`. If any warnings are printed, address them; otherwise, continue to Step 8.
8. Run `devutils/validate_patches.py -l build/src`. If errors occur, go back to Step 3.
This should leave unstaged changes in the git repository to be reviewed, added, and committed.
### Steps for fixing patches after a failed build attempt
If domain substitution is not applied, then the steps from the previous section will work for revising patches.
If domain substitution is applied, then the steps for the initial update will not apply since that would create patches which depend on domain substitution. Here is a method of dealing with this:
1. Revert domain substitution: `./utils/domain_substitution.py revert -c CACHE_PATH_HERE build/src`
2. Follow the patch updating section above
3. Reapply domain substitution: `./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c CACHE_PATH_HERE build/src`
4. Reattempt build. Repeat steps as necessary.
### Next steps
* Submit a Pull Request of these changes to the ungoogled-chromium repo.
* Once the PR is merged, update the repositories of each platform repository that you are maintaining under the `ungoogled-software` organization.
-100
View File
@@ -1,100 +0,0 @@
# List of flags and switches
This is an exhaustive list of command-line switches and flags introduced by ungoogled-chromium.
Each switch has a corresponding entry on the `chrome://flags` page which can be filtered by searching for `ungoogled-chromium`.
If a switch requires a value, you must specify it with an `=` sign; e.g. flag `--foo` with value `bar` should be written as `--foo=bar`.
> **NOTE**: If you add a command-line argument that is also in `chrome://flags`, the flag's state will not be indicated in `chrome://flags`. There is no universal way to ensure command-line flags are taking effect, but you can find if they're being seen by checking `chrome://version`.
- ### Available on all platforms
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-beforeunload` | Disables JavaScript dialog boxes triggered by `beforeunload`
`--disable-grease-tls` | Disables GREASE for TLS. Combined with `--http-accept-header` allows browser to look more like a tor-browser. See https://github.com/ungoogled-software/ungoogled-chromium/issues/783 for more details.
`--disable-search-engine-collection` | Disable automatic search engine scraping from webpages.
`--extension-mime-request-handling` | Change how extension MIME types (CRX and user scripts) are handled. Acceptable values are `download-as-regular-file` or `always-prompt-for-install`. Leave unset to use normal behavior.
`--fingerprinting-canvas-image-data-noise` | (Added flag to Bromite feature) Implements fingerprinting deception for Canvas image data retrieved via JS APIs. In the data, at most 10 pixels are slightly modified.
`--fingerprinting-canvas-measuretext-noise` | (Added flag to Bromite feature) Scale the output values of Canvas::measureText() with a randomly selected factor in the range -0.0003% to 0.0003%, which are recomputed on every document initialization.
`--fingerprinting-client-rects-noise` | (Added flag to Bromite feature) Implements fingerprinting deception of JS APIs `getClientRects()` and `getBoundingClientRect()` by scaling their output values with a random factor in the range -0.0003% to 0.0003%, which are recomputed for every document instantiation.
`--force-punycode-hostnames` | Convert all Internationalized Domain Names to punycode (ASCII representation of Unicode). See https://github.com/ungoogled-software/ungoogled-chromium/issues/370 for more details.
`--hide-crashed-bubble` | Hides the bubble box with the message "Restore Pages? Chromium didn't shut down correctly." that shows on startup after the browser did not exit cleanly.
`--http-accept-header` | Changes the default value of the `Accept` HTTP header sent with HTTP requests. Combined with `--disable-grease-tls` allows browser to look more like a tor-browser. See https://github.com/ungoogled-software/ungoogled-chromium/issues/783 for more details.
`--keep-old-history` | Disables deletion of local browser history after 90 days
`--max-connections-per-host` | (from Bromite) Configure the maximum allowed connections per host. Valid values are `6` and `15`
`--omnibox-autocomplete-filtering` | Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. Accepts `search`, `search-bookmarks`, `search-chrome`, and `search-bookmarks-chrome`.
`--popups-to-tabs` | Makes popups open in new tabs.
- ### Available only on desktop
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--bookmark-bar-ntp` | Sets the visibility of the bookmark bar on the New Tab Page. Only takes the value `never`.
`--close-confirmation` | Show a warning prompt when closing the browser window. Accepts `last` (prompt when closing the last window with several tabs) and `multiple` (prompt only if more than one window is open).
`--close-window-with-last-tab` | Determines whether a window should close once the last tab is closed. Only takes the value `never`.
`--custom-ntp` | Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank` or `chrome://new-tab-page`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page.
`--disable-sharing-hub` | Disables the sharing hub button.
`--enable-incognito-themes` | Allows themes to change the appearance of Incognito windows.
`--hide-extensions-menu` | Hides the extensions container. This includes the puzzle piece icon as well as any pinned extensions.
`--hide-fullscreen-exit-ui` | Hides the "X" that appears when the mouse cursor is moved towards the top of the window in fullscreen mode. Additionally, this hides the "Press F11 to exit full screen" popup.
`--hide-tab-close-buttons` | Hides the close buttons on tabs.
`--remove-grab-handle` | Removes the reserved empty space in the tabstrip for moving the window.
`--remove-tabsearch-button` | Removes the tabsearch button from the tabstrip.
`--scroll-tabs` | Determines if scrolling will cause a switch to a neighboring tab if the cursor hovers over the tabs, or the empty space beside the tabs. The flag requires one the values: `always`, `never`, `incognito-and-guest`. When omitted, the default is to use platform-specific behavior, which is currently enabled only on desktop Linux.
`--show-avatar-button` | Sets visibility of the avatar button. The flag requires one of the values: `always`, `incognito-and-guest` (only show Incognito or Guest modes), or `never`.
`--tab-hover-cards` | Allows removing the tab hover cards or using a tooltip as a replacement. This can be set with the values `none` or `tooltip`.
- #### Available only on Windows
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-encryption` | Disable encryption of cookies, passwords, and settings which uses a generated machine-specific encryption key. This is used to enable portable user data directories.
`--disable-machine-id` | Disables use of a generated machine-specific ID to lock the user data directory to that machine. This is used to enable portable user data directories.
## Feature flags
Feature flags are similar to switches with the difference being that they are passed as values for the `--enable-features` switch. Multiple features can be passed at the same time by separating them with a comma, e.g. `--enable-features=flag1,flag2,flag3`.
These are also available on the `chrome://flags` page.
- ### Available on all platforms
Feature | Description
-- | --
`MinimalReferrers` | Removes all cross-origin referrers and strips same-origin referrers down to the origin. Has lower precedence than `NoCrossOriginReferrers`.
`NoCrossOriginReferrers` | Removes all cross-origin referrers. Has lower precedence than `NoReferrers`.
`NoReferrers` | Removes all referrers.
`ReducedSystemInfo` | Reduces the amount of system information obatainable through headers and javascript, also causes hardwareConcurrency to respond with two cores.
`RemoveClientHints` | Removes client hints (information sent to servers about your system, similar to a user agent).
`SetIpv6ProbeFalse` | Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible.
`SpoofWebGLInfo` | Return generic values for WebGLDebugRendererInfo to remove a potential data leak while preventing potential website breakage.
- ### Available only on desktop
Feature | Description
-- | --
`ClearDataOnExit` | Clears all browsing data on exit.
`DisableLinkDrag` | Prevents dragging of links and selected text. Allows selecting text from a middle of a link. Also allows starting selection without first clearing the existing one. This behaviour is similar to the one from older Opera. See https://github.com/ungoogled-software/ungoogled-chromium/pull/2080 and https://github.com/ungoogled-software/ungoogled-chromium/discussions/2055 for more information.
`DisableQRGenerator` | Disables the QR generator for sharing page links.
## Flags for existing switches
Chromium contains switches that do no have corresponding entries in `chrome://flags`. For convenience, ungoogled-chromium has created entries for some of the commonly-used switches.
- ### Available on all platforms
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--disable-top-sites` | Disables the top sites and most visited entries on the new tab page.
`--disable-webgl` | Disable all versions of WebGL.
`--enable-low-end-device-mode` | Force low-end device mode when set.
`--force-dark-mode` | Forces dark mode in UI for platforms that support it.
`--no-default-browser-check` | Disables the default browser check.
`--no-pings` | Don't send hyperlink auditing pings.
`--webrtc-ip-handling-policy` | Restrict which IP addresses and interfaces WebRTC uses.
- ### Available only on desktop
<code>Switch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code> | Description
-- | --
`--incognito` | Start in Incognito.
`--start-maximized` | Starts the browser maximized, regardless of any previous settings.
-11
View File
@@ -1,11 +0,0 @@
# Supported Platforms
This page lists platforms officially supported by ungoogled-chromium, and their associated repositories.
* Android: [ungoogled-chromium-android](https://github.com/ungoogled-software/ungoogled-chromium-android)
* Arch Linux: [ungoogled-chromium-archlinux](https://github.com/ungoogled-software/ungoogled-chromium-archlinux)
* Debian, Ubuntu, and derivatives: [ungoogled-chromium-debian](https://github.com/ungoogled-software/ungoogled-chromium-debian)
* Fedora and CentOS: [ungoogled-chromium-fedora](https://github.com/ungoogled-software/ungoogled-chromium-fedora)
* Portable Linux (for any Linux distro): [ungoogled-chromium-portablelinux](https://github.com/ungoogled-software/ungoogled-chromium-portablelinux)
* Windows: [ungoogled-chromium-windows](https://github.com/ungoogled-software/ungoogled-chromium-windows)
* macOS: [ungoogled-chromium-macos](https://github.com/ungoogled-software/ungoogled-chromium-macos)
-56
View File
@@ -1,56 +0,0 @@
# Platform Repository Standards and Guidelines
*This document is new, and its structure and content may change. If you have suggestions, please create an issue!*
ungoogled-chromium is comprised of anonymous developers who volunteer their efforts. Some of these developers may choose to provide long-term support for [an officially-supported platform](platforms.md), or bring support to a new platform. For such developers, this document consists of standards and management guidelines for platform repos.
We will refer to this git repository as "the main repo", and refer to repositories that add platform-specific code to build ungoogled-chromium as "platform repos". An "officially-supported platform" is a platform with a platform repo in [the ungoogled-software organization](https://github.com/ungoogled-software) and noted in [docs/platforms.md](platforms.md).
## Standards
An officially-supported platform repo:
* Must not modify or remove existing patches, GN flags, domain substitution, or binary pruning in the main repo. Instead, you can add new patches or add more files/rules to domain substitution or binary pruning. (If you think a change is needed in the main repo, please make an issue!)
* Must have a tagging/versioning scheme that includes the ungoogled-chromium version.
* Must not require an Internet connection during compilation (before compilation is OK).
* Should allow the user to download all build requirements before building.
* Must not require external services to build, aside from repos in the ungoogled-software organization and repos provided by or used by Chromium.
* Should have a reproducible build for all versions (currently, there is no formal process to enforce/verify reproducibility of binaries)
Each deviation must be clearly noted in the platform repo's documentation (such as the repo's README), and have an associated issue in the platform repo.
## Teams in the ungoogled-software organization
Each officially-supported platform has one or more teams in the ungoogled-software organization. These teams provide additional means for collaborating with other developers, such as issue triaging and private discussions (see section "How to communicate" below).
If you are a regular contributor and would like to provide long-term support for a platform, you can request to be included in the ungoogled-software organization team for your platform. Since the number of developers is low, there is no formal process to do this; just ask in an issue.
## How to communicate
In the interest of transparency, it is recommended to discuss work in public spaces like issues or PRs. If a discussion should not involve outsiders, you can lock the issue or PR to collaborators only.
You must use team discussions if you are discussing or sharing information that can affect the security of the repository. Otherwise, you may use team discussions at your discretion.
## Issues
Each platform repo should have a team in ungoogled-software with the Triage permission level. All members should feel free to manage issues.
TODO: More details?
## Pull Requests
TODO
## Repository Settings and Shared Resources
Shared resources includes:
* CI services like CirrusCI, GitHub Actions, etc.
* Build services like OpenSUSE Build Service (OBS)
These need to be handled with care, as they can cause a wide variety of issues from security and privacy leaks all the way to data loss.
There are several ways to handle shared resources:
* Assign one person to manage a certain set of settings (i.e. grant them "ownership" of those settings). If you want to change a setting, you should request a change in a team discussion.
* TODO: More ways to manage settings?
+173 -155
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -5,7 +5,6 @@ disable_fieldtrial_testing_config=true
enable_hangout_services_extension=false
enable_mdns=false
enable_nacl=false
enable_reading_list=false
enable_remoting=false
enable_reporting=false
enable_service_discovery=false
@@ -10,7 +10,7 @@ Subject: Disable fetching of all field trials
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -59,7 +59,7 @@ public abstract class ChromeFeatureList
@@ -60,7 +60,7 @@ public abstract class ChromeFeatureList
* |kFeaturesExposedToJava| in chrome/browser/flags/android/chrome_feature_list.cc
*/
public static String getFieldTrialParamByFeature(String featureName, String paramName) {
@@ -19,7 +19,7 @@ Subject: Disable fetching of all field trials
}
/**
@@ -71,8 +71,7 @@ public abstract class ChromeFeatureList
@@ -72,8 +72,7 @@ public abstract class ChromeFeatureList
*/
public static boolean getFieldTrialParamByFeatureAsBoolean(
String featureName, String paramName, boolean defaultValue) {
@@ -29,7 +29,7 @@ Subject: Disable fetching of all field trials
}
/**
@@ -84,8 +83,7 @@ public abstract class ChromeFeatureList
@@ -85,8 +84,7 @@ public abstract class ChromeFeatureList
*/
public static int getFieldTrialParamByFeatureAsInt(
String featureName, String paramName, int defaultValue) {
@@ -39,7 +39,7 @@ Subject: Disable fetching of all field trials
}
/**
@@ -97,8 +95,7 @@ public abstract class ChromeFeatureList
@@ -98,8 +96,7 @@ public abstract class ChromeFeatureList
*/
public static double getFieldTrialParamByFeatureAsDouble(
String featureName, String paramName, double defaultValue) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3694,8 +3694,6 @@ static_library("browser") {
@@ -3752,8 +3752,6 @@ static_library("browser") {
"download/download_auto_open_policy_handler.cc",
"download/download_auto_open_policy_handler.h",
"download/download_commands.cc",
@@ -9,19 +9,19 @@
"download/download_dir_policy_handler.cc",
"download/download_dir_policy_handler.h",
"download/download_dir_util.cc",
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -5511,10 +5511,6 @@ ChromeContentBrowserClient::CreateThrott
throttles.push_back(std::make_unique<PolicyBlocklistNavigationThrottle>(
handle, handle->GetWebContents()->GetBrowserContext()));
--- a/chrome/browser/chrome_content_browser_client_navigation_throttles.cc
+++ b/chrome/browser/chrome_content_browser_client_navigation_throttles.cc
@@ -391,10 +391,6 @@ void CreateAndAddChromeThrottlesForNavig
registry.AddThrottle(std::make_unique<PolicyBlocklistNavigationThrottle>(
registry, handle.GetWebContents()->GetBrowserContext()));
- // Before setting up SSL error detection, configure SSLErrorHandler to invoke
- // the relevant extension API whenever an SSL interstitial is shown.
- SSLErrorHandler::SetClientCallbackOnInterstitialsShown(
- base::BindRepeating(&MaybeTriggerSecurityInterstitialShownEvent));
throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
handle,
base::BindOnce(&HandleSSLErrorWrapper), base::BindOnce(&IsInHostedApp),
registry.AddThrottle(std::make_unique<SSLErrorNavigationThrottle>(
registry, base::BindOnce(&HandleSSLErrorWrapper),
base::BindOnce(&IsInHostedApp),
--- a/chrome/browser/component_updater/file_type_policies_component_installer.cc
+++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc
@@ -38,21 +38,6 @@ const uint8_t kFileTypePoliciesPublicKey
@@ -180,7 +180,7 @@
class DownloadsShowFunction : public ExtensionFunction {
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
@@ -705,18 +705,6 @@ void WebstorePrivateBeginInstallWithMani
@@ -702,18 +702,6 @@ void WebstorePrivateBeginInstallWithMani
void WebstorePrivateBeginInstallWithManifest3Function::
ReportFrictionAcceptedEvent() {
@@ -253,7 +253,7 @@
# Note: is_android is not equivalent to safe_browsing_mode == 2.
# Sources and dependencies added to this block must not depend on anything
@@ -577,6 +579,7 @@ static_library("advanced_protection") {
@@ -579,6 +581,7 @@ static_library("advanced_protection") {
}
source_set("metrics_collector") {
@@ -261,7 +261,7 @@
sources = [
"safe_browsing_metrics_collector_factory.cc",
"safe_browsing_metrics_collector_factory.h",
@@ -596,6 +599,7 @@ source_set("metrics_collector") {
@@ -598,6 +601,7 @@ source_set("metrics_collector") {
"//components/safe_browsing/core/common:safe_browsing_prefs",
"//content/public/browser",
]
@@ -1,6 +1,6 @@
--- a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc
+++ b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc
@@ -891,93 +891,6 @@ std::tuple<GURL, std::string> AutofillCr
@@ -924,93 +924,6 @@ std::tuple<GURL, std::string> AutofillCr
}
bool AutofillCrowdsourcingManager::StartRequest(FormRequestData request_data) {
@@ -1,6 +1,6 @@
--- a/chrome/updater/configurator.cc
+++ b/chrome/updater/configurator.cc
@@ -115,7 +115,7 @@ base::TimeDelta Configurator::UpdateDela
@@ -133,7 +133,7 @@ base::TimeDelta Configurator::UpdateDela
std::vector<GURL> Configurator::UpdateUrl() const {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -2,7 +2,7 @@
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -477,14 +477,6 @@ group("gn_all") {
@@ -476,14 +476,6 @@ group("gn_all") {
]
}
@@ -112,7 +112,7 @@ by default.
scoped_refptr<base::SequencedTaskRunner> task_runner)
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
@@ -535,7 +535,7 @@ void WebRtcLogUploader::UploadCompressed
@@ -531,7 +531,7 @@ void WebRtcLogUploader::UploadCompressed
}
})");
@@ -189,7 +189,7 @@ by default.
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -73,17 +73,17 @@ namespace {
@@ -75,17 +75,17 @@ namespace {
// The URL for the the Learn More page shown on incognito new tab.
const char kLearnMoreIncognitoUrl[] =
#if BUILDFLAG(IS_CHROMEOS)
@@ -227,7 +227,7 @@ by default.
--- a/chrome/installer/setup/google_chrome_behaviors.cc
+++ b/chrome/installer/setup/google_chrome_behaviors.cc
@@ -36,7 +36,7 @@ namespace installer {
@@ -37,7 +37,7 @@ namespace installer {
namespace {
constexpr std::wstring_view kUninstallSurveyUrl(
@@ -39,7 +39,7 @@ the URL so we get notified if this happens again in the future).
kSafeBrowsingIncidentTrafficAnnotation =
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -304,11 +304,14 @@ IncidentReportingService::UploadContext:
@@ -303,11 +303,14 @@ IncidentReportingService::UploadContext:
// static
bool IncidentReportingService::IsEnabledForProfile(Profile* profile) {
@@ -38,7 +38,7 @@
--- a/components/affiliations/core/browser/hash_affiliation_fetcher.cc
+++ b/components/affiliations/core/browser/hash_affiliation_fetcher.cc
@@ -132,6 +132,10 @@ HashAffiliationFetcher::~HashAffiliation
@@ -128,6 +128,10 @@ HashAffiliationFetcher::~HashAffiliation
}
void HashAffiliationFetcher::StartRequest(
@@ -72,14 +72,14 @@
if (state_ == REQUESTING) {
--- a/components/themes/ntp_background_service.cc
+++ b/components/themes/ntp_background_service.cc
@@ -96,6 +96,7 @@ void NtpBackgroundService::Shutdown() {
@@ -88,6 +88,7 @@ void NtpBackgroundService::Shutdown() {
}
void NtpBackgroundService::FetchCollectionInfo() {
+ return;
// If a request is currently in progress, drop the new request.
if (collections_loader_ != nullptr) {
return;
}
--- a/components/update_client/update_checker.cc
+++ b/components/update_client/update_checker.cc
@@ -104,6 +104,7 @@ void UpdateCheckerImpl::CheckForUpdates(
@@ -35,7 +35,7 @@
--- a/components/omnibox/browser/autocomplete_input.cc
+++ b/components/omnibox/browser/autocomplete_input.cc
@@ -582,7 +582,8 @@ void AutocompleteInput::ParseForEmphasiz
@@ -578,7 +578,8 @@ void AutocompleteInput::ParseForEmphasiz
// For the view-source and blob schemes, we should emphasize the host of the
// URL qualified by the view-source or blob prefix.
if ((base::EqualsCaseInsensitiveASCII(scheme_str, kViewSourceScheme) ||
@@ -60,7 +60,7 @@
return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -939,6 +939,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
@@ -938,6 +938,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
RegisterWebSafeScheme(url::kWssScheme);
#endif // BUILDFLAG(ENABLE_WEBSOCKETS)
RegisterWebSafeScheme(url::kDataScheme);
@@ -70,7 +70,7 @@
// other origins, so we should not treat them as web safe. Remove callers of
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1094,6 +1094,8 @@ component("net") {
@@ -1101,6 +1101,8 @@ component("net") {
"url_request/static_http_user_agent_settings.cc",
"url_request/static_http_user_agent_settings.h",
"url_request/storage_access_status_cache.h",
@@ -2,7 +2,7 @@
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2752,24 +2752,6 @@ void ChromeContentBrowserClient::AppendE
@@ -2636,24 +2636,6 @@ void ChromeContentBrowserClient::AppendE
command_line->AppendSwitchASCII(switches::kMetricsClientID,
client_info->client_id);
}
@@ -26,7 +26,7 @@
- command_line->AppendSwitchASCII(switches::kEnableCrashReporter, switch_value);
#endif
if (logging::DialogsAreSuppressed())
if (logging::DialogsAreSuppressed()) {
--- a/components/crash/core/app/crashpad.cc
+++ b/components/crash/core/app/crashpad.cc
@@ -72,6 +72,12 @@ void InitializeDatabasePath(const base::
@@ -44,7 +44,7 @@
const base::FilePath& exe_path,
--- a/components/gwp_asan/client/gwp_asan.cc
+++ b/components/gwp_asan/client/gwp_asan.cc
@@ -323,6 +323,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
@@ -340,6 +340,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
// Exported for testing.
GWP_ASAN_EXPORT std::optional<AllocatorSettings> GetAllocatorSettings(
@@ -705,7 +705,7 @@
--- a/components/domain_reliability/uploader.cc
+++ b/components/domain_reliability/uploader.cc
@@ -81,7 +81,7 @@ class DomainReliabilityUploaderImpl : pu
@@ -80,7 +80,7 @@ class DomainReliabilityUploaderImpl : pu
if (discard_uploads_)
discarded_upload_count_++;
@@ -2,7 +2,7 @@
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -432,6 +432,7 @@ void GCMClientImpl::StartGCM() {
@@ -431,6 +431,7 @@ void GCMClientImpl::StartGCM() {
void GCMClientImpl::InitializeMCSClient() {
DCHECK(network_connection_tracker_);
@@ -10,7 +10,7 @@
std::vector<GURL> endpoints;
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
@@ -611,23 +612,6 @@ void GCMClientImpl::RemoveHeartbeatInter
@@ -610,23 +611,6 @@ void GCMClientImpl::RemoveHeartbeatInter
void GCMClientImpl::StartCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
@@ -34,7 +34,7 @@
}
void GCMClientImpl::OnCheckinCompleted(
@@ -684,24 +668,6 @@ void GCMClientImpl::SetGServicesSettings
@@ -683,24 +667,6 @@ void GCMClientImpl::SetGServicesSettings
void GCMClientImpl::SchedulePeriodicCheckin() {
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
@@ -565,7 +565,7 @@
bool IsProbablyGoogleSearchUrl(const GURL& url) {
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -615,10 +615,7 @@ std::u16string TemplateURLRef::SearchTer
@@ -621,10 +621,7 @@ std::u16string TemplateURLRef::SearchTer
bool TemplateURLRef::HasGoogleBaseURLs(
const SearchTermsData& search_terms_data) const {
ParseIfNecessary(search_terms_data);
@@ -692,7 +692,7 @@
--- a/net/base/url_util.cc
+++ b/net/base/url_util.cc
@@ -519,28 +519,6 @@ bool HasGoogleHost(const GURL& url) {
@@ -537,28 +537,6 @@ bool HasGoogleHost(const GURL& url) {
}
bool IsGoogleHost(std::string_view host) {
@@ -7,7 +7,7 @@
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -372,7 +372,6 @@ if (!is_android && !is_mac) {
@@ -369,7 +369,6 @@ if (!is_android && !is_mac) {
}
data_deps += [
@@ -15,7 +15,7 @@
"//components/webapps/isolated_web_apps/preload:component",
"//third_party/widevine/cdm",
]
@@ -1206,7 +1205,6 @@ if (is_win) {
@@ -1204,7 +1203,6 @@ if (is_win) {
":optimization_guide_library",
":swiftshader_binaries",
":widevine_cdm_library",
@@ -25,8 +25,8 @@
--- a/chrome/browser/resources/BUILD.gn
+++ b/chrome/browser/resources/BUILD.gn
@@ -89,11 +89,6 @@ group("resources") {
public_deps += [ "accessibility:reading_mode_gdocs_extension_resources" ]
@@ -97,11 +97,6 @@ group("resources") {
]
}
- if (is_mac) {
@@ -1,6 +1,6 @@
--- a/components/browsing_data/content/browsing_data_model.cc
+++ b/components/browsing_data/content/browsing_data_model.cc
@@ -998,12 +998,6 @@ void BrowsingDataModel::PopulateFromDisk
@@ -992,12 +992,6 @@ void BrowsingDataModel::PopulateFromDisk
base::FeatureList::IsEnabled(network::features::kSharedStorageAPI);
bool is_shared_dictionary_enabled = base::FeatureList::IsEnabled(
network::features::kCompressionDictionaryTransportBackend);
@@ -13,7 +13,7 @@
base::RepeatingClosure completion =
base::BindRepeating([](const base::OnceClosure&) {},
@@ -1040,27 +1034,7 @@ void BrowsingDataModel::PopulateFromDisk
@@ -1034,27 +1028,7 @@ void BrowsingDataModel::PopulateFromDisk
base::BindOnce(&OnSharedDictionaryUsageLoaded, this, completion));
}
@@ -52,7 +52,7 @@
}
// static
@@ -864,7 +864,7 @@ void PrivacySandboxSettingsImpl::SetTopi
@@ -888,7 +888,7 @@ void PrivacySandboxSettingsImpl::SetTopi
}
bool PrivacySandboxSettingsImpl::IsPrivacySandboxRestricted() const {
@@ -61,7 +61,7 @@
}
bool PrivacySandboxSettingsImpl::IsPrivacySandboxCurrentlyUnrestricted() const {
@@ -933,11 +933,7 @@ PrivacySandboxSettingsImpl::GetPrivacySa
@@ -957,11 +957,7 @@ PrivacySandboxSettingsImpl::GetPrivacySa
return Status::kIncognitoProfile;
}
@@ -164,7 +164,7 @@
// static
--- a/content/browser/interest_group/ad_auction_service_impl.cc
+++ b/content/browser/interest_group/ad_auction_service_impl.cc
@@ -193,11 +193,6 @@ AdAuctionServiceImpl::BiddingAndAuctionD
@@ -192,11 +192,6 @@ AdAuctionServiceImpl::BiddingAndAuctionD
void AdAuctionServiceImpl::CreateMojoService(
RenderFrameHost* render_frame_host,
mojo::PendingReceiver<blink::mojom::AdAuctionService> receiver) {
@@ -178,7 +178,7 @@
void AdAuctionServiceImpl::JoinInterestGroup(
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -1466,38 +1466,7 @@ void StoragePartitionImpl::Initialize(
@@ -1469,38 +1469,7 @@ void StoragePartitionImpl::Initialize(
bucket_manager_ = std::make_unique<BucketManager>(this);
@@ -217,7 +217,7 @@
GeneratedCodeCacheSettings settings =
GetContentClient()->browser()->GetGeneratedCodeCacheSettings(
@@ -1526,8 +1495,6 @@ void StoragePartitionImpl::Initialize(
@@ -1529,8 +1498,6 @@ void StoragePartitionImpl::Initialize(
font_access_manager_ = FontAccessManager::Create();
@@ -226,7 +226,7 @@
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (is_in_memory()) {
@@ -1551,11 +1518,6 @@ void StoragePartitionImpl::Initialize(
@@ -1554,11 +1521,6 @@ void StoragePartitionImpl::Initialize(
std::make_unique<SharedStorageHeaderObserver>(this);
}
@@ -240,7 +240,7 @@
void StoragePartitionImpl::OnStorageServiceDisconnected() {
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3979,12 +3979,6 @@ void WebContentsImpl::Init(const WebCont
@@ -4107,12 +4107,6 @@ void WebContentsImpl::Init(const WebCont
DateTimeChooser::CreateDateTimeChooser(this);
#endif
@@ -2,7 +2,7 @@
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
@@ -183,31 +183,13 @@ void WebRtcLogUploader::OnLoggingStopped
@@ -179,31 +179,13 @@ void WebRtcLogUploader::OnLoggingStopped
DCHECK(meta_data.get());
DCHECK(!upload_done_data.paths.directory.empty());
@@ -35,7 +35,7 @@
} else {
main_task_runner_->PostTask(
FROM_HERE,
@@ -224,28 +206,7 @@ void WebRtcLogUploader::PrepareMultipart
@@ -220,28 +202,7 @@ void WebRtcLogUploader::PrepareMultipart
DCHECK(!compressed_log.empty());
DCHECK(meta_data.get());
@@ -65,7 +65,7 @@
}
void WebRtcLogUploader::UploadStoredLog(
@@ -312,48 +273,6 @@ void WebRtcLogUploader::LoggingStoppedDo
@@ -308,48 +269,6 @@ void WebRtcLogUploader::LoggingStoppedDo
DCHECK(log_buffer.get());
DCHECK(!log_paths.directory.empty());
@@ -116,7 +116,7 @@
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -114,7 +114,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -130,7 +130,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
registry->RegisterBooleanPref(prefs::kWebRtcEventLogCollectionAllowed, false);
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
@@ -55,7 +55,7 @@
base::FEATURE_ENABLED_BY_DEFAULT),
--- a/services/network/public/cpp/features.cc
+++ b/services/network/public/cpp/features.cc
@@ -124,12 +124,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIso
@@ -108,12 +108,7 @@ BASE_FEATURE(kSplitAuthCacheByNetworkIso
// Enable usage of hardcoded DoH upgrade mapping for use in automatic mode.
BASE_FEATURE(kDnsOverHttpsUpgrade,
"DnsOverHttpsUpgrade",
@@ -1,6 +1,6 @@
--- a/chrome/browser/extensions/api/developer_private/extension_info_generator_desktop.cc
+++ b/chrome/browser/extensions/api/developer_private/extension_info_generator_desktop.cc
@@ -61,17 +61,6 @@ void ExtensionInfoGenerator::FillExtensi
@@ -54,17 +54,6 @@ void ExtensionInfoGenerator::FillExtensi
info.controlled_info.emplace();
info.controlled_info->text =
l10n_util::GetStringUTF8(IDS_EXTENSIONS_INSTALL_LOCATION_ENTERPRISE);
@@ -17,7 +17,7 @@
- }
}
// Dependent extensions.
// Pinned to toolbar.
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -322,31 +322,7 @@ bool ExtensionManagement::IsAllowedManif
@@ -81,7 +81,7 @@
bool ExtensionManagement::IsAllowedByUnpublishedAvailabilityPolicy(
--- a/chrome/browser/extensions/manifest_v2_experiment_manager.cc
+++ b/chrome/browser/extensions/manifest_v2_experiment_manager.cc
@@ -146,22 +146,6 @@ bool ManifestV2ExperimentManagerFactory:
@@ -145,22 +145,6 @@ bool ManifestV2ExperimentManagerFactory:
// Determines the current stage of the MV2 deprecation experiments.
MV2ExperimentStage CalculateCurrentExperimentStage() {
@@ -104,7 +104,7 @@
return MV2ExperimentStage::kNone;
}
@@ -201,19 +185,7 @@ PrefMap GetGlobalNoticeAcknowledgedPrefF
@@ -200,19 +184,7 @@ PrefMap GetGlobalNoticeAcknowledgedPrefF
// Returns true if legacy extensions should be disabled, looking at both
// experiment stage and global state.
bool ShouldDisableLegacyExtensions(MV2ExperimentStage stage) {
@@ -137,7 +137,7 @@
source->AddResourcePath("images/product_logo.png",
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -96,13 +96,6 @@ bool IsManifestSupported(int manifest_ve
@@ -104,13 +104,6 @@ bool IsManifestSupported(int manifest_ve
// Supported versions are always safe.
if (manifest_version >= kMinimumSupportedManifestVersion &&
manifest_version <= kMaximumSupportedManifestVersion) {
@@ -3,7 +3,7 @@
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -373,7 +373,6 @@ if (!is_android && !is_mac) {
@@ -370,7 +370,6 @@ if (!is_android && !is_mac) {
data_deps += [
"//chrome/browser/resources/media/mei_preload:component",
@@ -11,7 +11,7 @@
"//components/webapps/isolated_web_apps/preload:component",
"//third_party/widevine/cdm",
]
@@ -937,8 +936,6 @@ if (is_win) {
@@ -934,8 +933,6 @@ if (is_win) {
bundle_data("chrome_framework_resources") {
sources = [
@@ -20,7 +20,7 @@
# This image is used to badge the lock icon in the
# authentication dialogs, such as those used for installation
# from disk image and Keystone promotion (if so enabled). It
@@ -1210,7 +1207,6 @@ if (is_win) {
@@ -1208,7 +1205,6 @@ if (is_win) {
":swiftshader_binaries",
":widevine_cdm_library",
"//chrome/browser/resources/media/mei_preload:component_bundle",
@@ -30,7 +30,7 @@
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -761,10 +761,6 @@ static_library("browser") {
@@ -775,10 +775,6 @@ static_library("browser") {
"navigation_predictor/navigation_predictor_metrics_document_data.h",
"navigation_predictor/navigation_predictor_preconnect_client.cc",
"navigation_predictor/navigation_predictor_preconnect_client.h",
@@ -41,7 +41,7 @@
"navigation_predictor/search_engine_preconnector_keyed_service_factory.cc",
"navigation_predictor/search_engine_preconnector_keyed_service_factory.h",
"net/cert_verifier_service_time_updater.cc",
@@ -3560,10 +3556,6 @@ static_library("browser") {
@@ -3618,10 +3614,6 @@ static_library("browser") {
} else {
#!is_android
sources += [
@@ -52,27 +52,27 @@
"accessibility/caption_bubble_context_browser.h",
"accessibility/embedded_a11y_extension_loader.cc",
"accessibility/embedded_a11y_extension_loader.h",
@@ -4283,8 +4275,6 @@ static_library("browser") {
@@ -4329,8 +4321,6 @@ static_library("browser") {
"//chrome/app:command_ids",
"//chrome/app/theme:chrome_unscaled_resources_grit",
"//chrome/app/vector_icons",
- "//chrome/browser/accessibility/tree_fixing:prefs",
- "//chrome/browser/accessibility/tree_fixing:service",
"//chrome/browser/actor",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/link_capturing",
"//chrome/browser/contextual_cueing",
@@ -4305,10 +4295,6 @@ static_library("browser") {
@@ -4350,10 +4340,6 @@ static_library("browser") {
"//chrome/browser/metrics/desktop_session_duration",
"//chrome/browser/new_tab_page/chrome_colors",
"//chrome/browser/policy:path_parser",
"//chrome/browser/resources:component_extension_resources",
- "//chrome/browser/screen_ai:prefs",
- "//chrome/browser/screen_ai:screen_ai_install_state",
- "//chrome/browser/screen_ai:screen_ai_service_router_factory",
- "//chrome/browser/screen_ai/public:optical_character_recognizer",
"//chrome/browser/search/background",
"//chrome/browser/sharing_hub",
"//chrome/browser/smart_card",
"//chrome/browser/themes",
@@ -4442,9 +4428,6 @@ static_library("browser") {
@@ -4512,9 +4498,6 @@ static_library("browser") {
"//components/webauthn/core/browser",
"//components/webauthn/core/browser:passkey_model",
"//services/device/public/cpp/hid",
@@ -82,7 +82,7 @@
"//third_party/crashpad/crashpad/client:common",
"//third_party/zxcvbn-cpp",
"//ui/views",
@@ -4544,8 +4527,6 @@ static_library("browser") {
@@ -4630,8 +4613,6 @@ static_library("browser") {
sources += [
"accessibility/soda_installer_impl.cc",
"accessibility/soda_installer_impl.h",
@@ -91,7 +91,7 @@
"device_identity/device_oauth2_token_store_desktop.cc",
"device_identity/device_oauth2_token_store_desktop.h",
"device_notifications/device_status_icon_renderer.cc",
@@ -4584,8 +4565,6 @@ static_library("browser") {
@@ -4670,8 +4651,6 @@ static_library("browser") {
"profiles/profile_activity_metrics_recorder.h",
"profiles/profile_list_desktop.cc",
"profiles/profile_list_desktop.h",
@@ -100,15 +100,15 @@
"signin/force_signin_verifier.cc",
"signin/force_signin_verifier.h",
"signin/signin_manager.cc",
@@ -5386,7 +5365,6 @@ static_library("browser") {
@@ -5471,7 +5450,6 @@ static_library("browser") {
"//chrome/browser/policy:system_features_disable_list",
"//chrome/browser/push_notification:push_notification",
"//chrome/browser/resources:app_icon_resources",
- "//chrome/browser/screen_ai:screen_ai_dlc_installer",
"//chrome/browser/sharesheet",
"//chrome/browser/support_tool/ash",
"//chrome/browser/ui/ash/accelerator",
"//chrome/browser/ui/ash/accessibility",
@@ -5651,7 +5629,6 @@ static_library("browser") {
@@ -5738,7 +5716,6 @@ static_library("browser") {
"//remoting/host/chromeos:browser_interop",
"//remoting/host/chromeos:features",
"//services/device/public/cpp/geolocation",
@@ -116,7 +116,7 @@
"//third_party/nearby:rpc_resources_proto",
"//third_party/nearby:wire_format_proto",
"//ui/chromeos",
@@ -7893,12 +7870,6 @@ static_library("browser") {
@@ -7993,12 +7970,6 @@ static_library("browser") {
}
if (enable_pdf) {
@@ -145,7 +145,7 @@
}
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -250,12 +250,10 @@
@@ -246,12 +246,10 @@
#if BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/chromeos/extensions/telemetry/chromeos_telemetry_extensions_browser_api_provider.h"
#include "chrome/browser/hid/hid_pinned_notification.h"
@@ -158,7 +158,7 @@
#include "chrome/browser/usb/usb_status_icon.h"
#include "components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h"
#endif
@@ -1381,9 +1379,6 @@ void BrowserProcessImpl::PreMainMessageL
@@ -1382,9 +1380,6 @@ void BrowserProcessImpl::PreMainMessageL
soda_installer_impl_ = std::make_unique<speech::SodaInstallerImplChromeOS>();
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -192,7 +192,7 @@
std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
--- a/chrome/browser/chrome_browser_interface_binders.cc
+++ b/chrome/browser/chrome_browser_interface_binders.cc
@@ -82,8 +82,6 @@
@@ -81,8 +81,6 @@
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
BUILDFLAG(IS_CHROMEOS)
@@ -229,7 +229,7 @@
void BindModelBroker(
content::RenderFrameHost* frame_host,
@@ -530,11 +507,6 @@ void PopulateChromeFrameBinders(
@@ -532,11 +509,6 @@ void PopulateChromeFrameBinders(
base::BindRepeating(&web_app::SubAppsServiceImpl::CreateIfAllowed));
}
@@ -252,7 +252,7 @@
#endif // BUILDFLAG(IS_ANDROID)
#if !BUILDFLAG(IS_ANDROID)
@@ -237,9 +235,6 @@ void RegisterComponentsForUpdate() {
@@ -239,9 +237,6 @@ void RegisterComponentsForUpdate() {
RegisterAutofillStatesComponent(cus, g_browser_process->local_state());
@@ -367,7 +367,7 @@
void NavigationPredictor::SetModelScoreCallbackForTesting(
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -100,7 +100,6 @@ void AddPdfViewerStrings(base::Value::Di
@@ -110,7 +110,6 @@ void AddPdfViewerStrings(base::Value::Di
{"rotationStateLabel90", IDS_PDF_ROTATION_STATE_LABEL_90},
{"rotationStateLabel180", IDS_PDF_ROTATION_STATE_LABEL_180},
{"rotationStateLabel270", IDS_PDF_ROTATION_STATE_LABEL_270},
@@ -375,33 +375,76 @@
{"thumbnailPageAriaLabel", IDS_PDF_THUMBNAIL_PAGE_ARIA_LABEL},
{"tooltipAttachments", IDS_PDF_TOOLTIP_ATTACHMENTS},
{"tooltipDocumentOutline", IDS_PDF_TOOLTIP_DOCUMENT_OUTLINE},
--- a/chrome/browser/permissions/BUILD.gn
+++ b/chrome/browser/permissions/BUILD.gn
@@ -42,8 +42,6 @@ source_set("permissions") {
"permissions_aiv1_handler.h",
"prediction_based_permission_ui_selector.cc",
"prediction_based_permission_ui_selector.h",
- "prediction_model_handler_provider.cc",
- "prediction_model_handler_provider.h",
"prediction_service_factory.cc",
"prediction_service_factory.h",
"prediction_service_request.cc",
--- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
@@ -283,21 +283,6 @@ void PredictionBasedPermissionUiSelector
@@ -250,30 +250,6 @@ void PredictionBasedPermissionUiSelector
if (snapshot.drawsNothing()) {
VLOG(1) << "[PermissionsAIv3] The page's snapshot is empty";
} else {
- PredictionModelHandlerProvider* prediction_model_handler_provider =
- PredictionModelHandlerProviderFactory::GetForBrowserContext(profile_);
- LogPredictionModelHandlerProviderForAiv3(
- prediction_model_handler_provider != nullptr);
- if (prediction_model_handler_provider) {
- PermissionsAiv3Handler* aiv3_handler =
- prediction_model_handler_provider->GetPermissionsAiv3Handler(
- request_metadata.request_type);
-
- LogPermissionsAiv3HandlerForAiv3(aiv3_handler != nullptr);
- if (aiv3_handler) {
- VLOG(1) << "[PermissionsAIv3] Inquire model";
-
- aiv3_handler->ExecuteModel(
- base::BindRepeating(
- &PredictionBasedPermissionUiSelector::
- OnDeviceAiv3ModelExecutionCallback,
- weak_ptr_factory_.GetWeakPtr(),
- /*model_inquire_start_time=*/base::TimeTicks::Now(),
- std::move(features), std::move(request_metadata)),
- std::make_unique<SkBitmap>(snapshot));
- return;
- }
- }
VLOG(1) << "[PermissionsAIv3] On device AI model session unavailable";
}
InquireServerModel(features, std::move(request_metadata),
@@ -404,22 +380,6 @@ void PredictionBasedPermissionUiSelector
if (inner_text.size() > kPageContentMaxLength) {
inner_text.resize(kPageContentMaxLength);
}
- if (PredictionModelHandlerProvider* prediction_model_handler_provider =
- PredictionModelHandlerProviderFactory::GetForBrowserContext(
- profile_)) {
- if (PermissionsAiv1Handler* aiv1_model_handler =
- if (PermissionsAiv1Handler* aiv1_handler =
- prediction_model_handler_provider->GetPermissionsAiv1Handler()) {
- VLOG(1) << "[PermissionsAIv1] Inquire model.";
- aiv1_model_handler->InquireAiOnDeviceModel(
- std::move(inner_text), request_type,
- VLOG(1) << "[PermissionsAIv1] Inquire model";
- aiv1_handler->InquireAiOnDeviceModel(
- std::move(inner_text), request_metadata.request_type,
- base::BindRepeating(&PredictionBasedPermissionUiSelector::
- AiOnDeviceModelExecutionCallback,
- OnDeviceAiv1ModelExecutionCallback,
- weak_ptr_factory_.GetWeakPtr(),
- std::move(features), request_type));
- std::move(features),
- std::move(request_metadata)));
- return;
- }
- }
VLOG(1) << "[PermissionsAIv1] On device AI model session unavailable";
} else {
VLOG(1) << "[PermissionsAIv1] The page's contnet too short or empty";
VLOG(1) << "[PermissionsAIv1] The page's content is too short or empty";
--- a/chrome/browser/prefs/BUILD.gn
+++ b/chrome/browser/prefs/BUILD.gn
@@ -274,7 +274,6 @@ source_set("impl") {
@@ -286,7 +286,6 @@ source_set("impl") {
} else {
deps += [
"//chrome/browser/promos:utils",
@@ -411,7 +454,7 @@
"//chrome/browser/search_engines",
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1807,9 +1807,6 @@ void RegisterLocalState(PrefRegistrySimp
@@ -1842,9 +1842,6 @@ void RegisterLocalState(PrefRegistrySimp
DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
#endif
@@ -423,7 +466,7 @@
PlatformAuthPolicyObserver::RegisterPrefs(registry);
--- a/chrome/browser/profiles/BUILD.gn
+++ b/chrome/browser/profiles/BUILD.gn
@@ -297,7 +297,6 @@ source_set("profiles_extra_parts_impl")
@@ -305,7 +305,6 @@ source_set("profiles_extra_parts_impl")
]
} else {
deps += [
@@ -431,7 +474,7 @@
"//chrome/browser/apps/app_service",
"//chrome/browser/autofill",
"//chrome/browser/contextual_cueing",
@@ -305,7 +304,6 @@ source_set("profiles_extra_parts_impl")
@@ -313,7 +312,6 @@ source_set("profiles_extra_parts_impl")
"//chrome/browser/feedback",
"//chrome/browser/hid",
"//chrome/browser/media/router/discovery/access_code:access_code_sink_service",
@@ -441,7 +484,7 @@
"//chrome/browser/search_engine_choice",
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -104,7 +104,6 @@
@@ -105,7 +105,6 @@
#include "chrome/browser/media_galleries/media_galleries_preferences_factory.h"
#include "chrome/browser/metrics/variations/google_groups_manager_factory.h"
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
@@ -449,15 +492,15 @@
#include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
#include "chrome/browser/navigation_predictor/search_engine_preconnector_keyed_service_factory.h"
#include "chrome/browser/net/dns_probe_service_factory.h"
@@ -326,7 +325,6 @@
#include "chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade_factory.h"
@@ -332,7 +331,6 @@
#include "chrome/browser/prefs/persistent_renderer_prefs_manager_factory.h"
#include "chrome/browser/privacy_sandbox/privacy_sandbox_survey_desktop_controller_factory.h"
#include "chrome/browser/profile_resetter/reset_report_uploader_factory.h"
-#include "chrome/browser/screen_ai/screen_ai_service_router_factory.h"
#include "chrome/browser/search/background/ntp_background_service_factory.h"
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
#include "chrome/browser/search/instant_service_factory.h"
@@ -1025,7 +1023,6 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -1039,7 +1037,6 @@ void ChromeBrowserMainExtraPartsProfiles
#if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
net::ServerCertificateDatabaseServiceFactory::GetInstance();
#endif
@@ -465,7 +508,7 @@
#if BUILDFLAG(IS_CHROMEOS)
NearbySharingServiceFactory::GetInstance();
if (base::FeatureList::IsEnabled(ash::features::kNearbyPresence)) {
@@ -1077,9 +1074,6 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -1091,9 +1088,6 @@ void ChromeBrowserMainExtraPartsProfiles
OneTimePermissionsTrackerFactory::GetInstance();
#endif
OpenerHeuristicServiceFactory::GetInstance();
@@ -475,7 +518,7 @@
OptimizationGuideKeyedServiceFactory::GetInstance();
OriginKeyedPermissionActionServiceFactory::GetInstance();
OriginTrialsFactory::GetInstance();
@@ -1146,13 +1140,6 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -1168,13 +1162,6 @@ void ChromeBrowserMainExtraPartsProfiles
policy::UserPolicySigninServiceFactory::GetInstance();
#endif
PolicyBlocklistFactory::GetInstance();
@@ -489,7 +532,7 @@
PredictionServiceFactory::GetInstance();
predictors::AutocompleteActionPredictorFactory::GetInstance();
predictors::LoadingPredictorFactory::GetInstance();
@@ -1239,13 +1226,6 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -1261,13 +1248,6 @@ void ChromeBrowserMainExtraPartsProfiles
#else
SafetyHubMenuNotificationServiceFactory::GetInstance();
SafetyHubHatsServiceFactory::GetInstance();
@@ -503,7 +546,7 @@
#endif
#if BUILDFLAG(IS_CHROMEOS)
if (ash::features::IsScannerEnabled()) {
@@ -1356,7 +1336,6 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -1378,7 +1358,6 @@ void ChromeBrowserMainExtraPartsProfiles
TrackingProtectionSettingsFactory::GetInstance();
translate::TranslateRankerFactory::GetInstance();
#if !BUILDFLAG(IS_ANDROID)
@@ -527,7 +570,7 @@
// System Profile.
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -846,24 +846,6 @@ void ProfileImpl::DoFinalInit(CreateMode
@@ -845,24 +845,6 @@ void ProfileImpl::DoFinalInit(CreateMode
// The password settings service needs to start listening to settings
// changes from Google Mobile Services, as early as possible.
PasswordManagerSettingsServiceFactory::GetForProfile(this);
@@ -562,7 +605,7 @@
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/delete_profile_helper.h"
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
@@ -1506,9 +1505,6 @@ void ProfileManager::DoFinalInitForServi
@@ -1509,9 +1508,6 @@ void ProfileManager::DoFinalInitForServi
// Ensure NavigationPredictorKeyedService is started.
NavigationPredictorKeyedServiceFactory::GetForProfile(profile);
@@ -574,7 +617,7 @@
#if BUILDFLAG(IS_ANDROID)
--- a/chrome/browser/resources/BUILD.gn
+++ b/chrome/browser/resources/BUILD.gn
@@ -92,7 +92,6 @@ group("resources") {
@@ -100,7 +100,6 @@ group("resources") {
if (is_mac) {
public_deps += [
"//chrome/browser/resources/media/mei_preload:component",
@@ -584,7 +627,7 @@
--- a/chrome/browser/resources/pdf/pdf_viewer.html
+++ b/chrome/browser/resources/pdf/pdf_viewer.html
@@ -98,10 +98,6 @@ import {AnnotationMode} from './constant
@@ -100,10 +100,6 @@ import {AnnotationMode} from './constant
</cr-page-selector>
` : ''}
</if>
@@ -597,7 +640,7 @@
${this.showErrorDialog ? html`<viewer-error-dialog id="error-dialog">
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1722,8 +1722,6 @@ static_library("ui") {
@@ -1657,8 +1657,6 @@ static_library("ui") {
"//chrome/browser/regional_capabilities",
"//chrome/browser/safe_browsing",
"//chrome/browser/safe_browsing:advanced_protection",
@@ -606,7 +649,7 @@
"//chrome/browser/smart_card:smart_card",
"//chrome/browser/tab_group_sync:utils",
"//chrome/browser/themes",
@@ -2415,7 +2413,6 @@ static_library("ui") {
@@ -2370,7 +2368,6 @@ static_library("ui") {
"//chrome/browser/policy:onc",
"//chrome/browser/policy:system_features_disable_list",
"//chrome/browser/push_notification:push_notification",
@@ -750,7 +793,7 @@
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
#include "chrome/browser/translate/chrome_translate_client.h"
#include "chrome/browser/ui/browser.h"
@@ -364,24 +362,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
@@ -369,24 +367,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
prefs_lang = language::ExtractBaseLanguage(prefs_lang);
SetDefaultLanguageCode(prefs_lang);
@@ -775,7 +818,7 @@
// Enable accessibility for the top level render frame and all descendants.
// This causes AXTreeSerializer to reset and send accessibility events of
@@ -829,12 +809,6 @@ void ReadAnythingUntrustedPageHandler::S
@@ -856,12 +836,6 @@ void ReadAnythingUntrustedPageHandler::S
weak_factory_.GetSafeRef(), inner_contents[0], kReadAnythingAXMode);
}
}
@@ -790,7 +833,7 @@
--- a/chrome/renderer/BUILD.gn
+++ b/chrome/renderer/BUILD.gn
@@ -371,18 +371,6 @@ static_library("renderer") {
@@ -373,18 +373,6 @@ static_library("renderer") {
]
} else {
sources += [
@@ -809,7 +852,7 @@
"media/chrome_speech_recognition_client.cc",
"media/chrome_speech_recognition_client.h",
"searchbox/searchbox.cc",
@@ -396,7 +384,6 @@ static_library("renderer") {
@@ -399,7 +387,6 @@ static_library("renderer") {
"//components/crx_file",
"//components/trusted_vault",
"//services/screen_ai/buildflags",
@@ -824,10 +867,10 @@
#if !BUILDFLAG(IS_ANDROID)
-#include "chrome/renderer/accessibility/read_anything/read_anything_app_controller.h"
#include "chrome/renderer/actor/tool_executor.h"
#include "chrome/renderer/searchbox/searchbox_extension.h"
#endif // !BUILDFLAG(IS_ANDROID)
@@ -321,21 +320,6 @@ void ChromeRenderFrameObserver::DidCommi
@@ -318,21 +317,6 @@ void ChromeRenderFrameObserver::DidCommi
}
void ChromeRenderFrameObserver::DidClearWindowObject() {
@@ -851,7 +894,7 @@
void ChromeRenderFrameObserver::DidMeaningfulLayout(
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -2250,9 +2250,6 @@ if (!is_android) {
@@ -2275,9 +2275,6 @@ if (!is_android) {
"//chrome/browser/resource_coordinator:tab_manager_features",
"//chrome/browser/safe_browsing:advanced_protection",
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
@@ -861,7 +904,7 @@
"//chrome/browser/search",
"//chrome/browser/search_engines",
"//chrome/browser/segmentation_platform:test_utils",
@@ -2664,9 +2661,6 @@ if (!is_android) {
@@ -2699,9 +2696,6 @@ if (!is_android) {
"//services/network/public/proto:sct_audit_report_proto",
"//services/preferences/public/cpp",
"//services/preferences/public/cpp/tracked",
@@ -871,30 +914,30 @@
"//services/service_manager/public/cpp",
"//services/strings",
"//services/test/echo/public/mojom",
@@ -8211,7 +8205,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
@@ -8265,7 +8259,6 @@ test("unit_tests") {
#
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
- "../browser/screen_ai:screen_ai_install_state",
"//chrome:packed_resources_integrity_header",
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service",
@@ -8246,7 +8239,6 @@ test("unit_tests") {
@@ -8299,7 +8292,6 @@ test("unit_tests") {
"//chrome/browser/profile_resetter:fake_profile_resetter",
"//chrome/browser/resource_coordinator:tab_manager_features",
"//chrome/browser/resources:component_extension_resources_grit",
"//chrome/browser/resources/new_tab_page_instant:resources_grit",
- "//chrome/browser/screen_ai:unit_tests",
"//chrome/browser/search/background",
"//chrome/browser/search/background:constants",
"//chrome/browser/search_engine_choice:unit_tests",
@@ -8358,7 +8350,6 @@ test("unit_tests") {
@@ -8413,7 +8405,6 @@ test("unit_tests") {
"//components/webapps/browser",
"//services/metrics/public/cpp:ukm_builders",
"//services/network:test_support",
- "//services/screen_ai:test_support",
"//services/video_effects/test:test_support",
"//third_party/crashpad/crashpad/util",
"//third_party/libaddressinput",
"//third_party/lzma_sdk/google:unit_tests",
--- a/chrome/test/chromedriver/BUILD.gn
+++ b/chrome/test/chromedriver/BUILD.gn
@@ -408,7 +408,7 @@ source_set("lib") {
@@ -918,9 +961,9 @@
python_library("fixtures") {
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -144,7 +144,6 @@ static_library("utility") {
"//chrome/common/importer:interfaces",
@@ -145,7 +145,6 @@ static_library("utility") {
"//components/autofill/core/common",
"//components/user_data_importer/common",
"//services/proxy_resolver:lib",
- "//services/screen_ai",
]
@@ -960,7 +1003,7 @@
#if BUILDFLAG(ENABLE_BROWSER_SPEECH_SERVICE)
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -597,7 +597,6 @@ test("components_unittests") {
@@ -600,7 +600,6 @@ test("components_unittests") {
"//components/media_router/common/providers/cast/channel:unit_tests",
"//components/page_info:unit_tests",
"//components/permissions:unit_tests",
@@ -1023,24 +1066,20 @@
return wrapper_node;
--- a/components/pdf/renderer/pdf_view_web_plugin_client.cc
+++ b/components/pdf/renderer/pdf_view_web_plugin_client.cc
@@ -203,34 +203,6 @@ PdfViewWebPluginClient::CreateAssociated
@@ -203,44 +203,6 @@ PdfViewWebPluginClient::CreateAssociated
return GetFrame()->CreateAssociatedURLLoader(options);
}
-void PdfViewWebPluginClient::GetOcrMaxImageDimension(
- base::OnceCallback<void(uint32_t)> callback) {
- ConnectOcrIfNeeded();
- return screen_ai_annotator_->GetMaxImageDimension(std::move(callback));
-}
-
-void PdfViewWebPluginClient::PerformOcr(
- const SkBitmap& image,
- base::OnceCallback<void(screen_ai::mojom::VisualAnnotationPtr)> callback) {
- CHECK(base::FeatureList::IsEnabled(ax::mojom::features::kScreenAIOCREnabled));
-
- if (!screen_ai_annotator_.is_bound()) {
- render_frame_->GetBrowserInterfaceBroker().GetInterface(
- screen_ai_annotator_.BindNewPipeAndPassReceiver());
- screen_ai_annotator_->SetClientType(
- screen_ai::mojom::OcrClientType::kPdfViewer);
- screen_ai_annotator_.set_disconnect_handler(
- base::BindOnce(&PdfViewWebPluginClient::OnOcrDisconnected,
- weak_factory_.GetWeakPtr()));
- }
- ConnectOcrIfNeeded();
- screen_ai_annotator_->PerformOcrAndReturnAnnotation(image,
- std::move(callback));
-}
@@ -1054,6 +1093,20 @@
- screen_ai_annotator_.reset();
- CHECK(ocr_disconnect_callback_);
- ocr_disconnect_callback_.Run();
-}
-
-void PdfViewWebPluginClient::ConnectOcrIfNeeded() {
- CHECK(base::FeatureList::IsEnabled(ax::mojom::features::kScreenAIOCREnabled));
-
- if (!screen_ai_annotator_.is_bound()) {
- render_frame_->GetBrowserInterfaceBroker().GetInterface(
- screen_ai_annotator_.BindNewPipeAndPassReceiver());
- screen_ai_annotator_->SetClientType(
- screen_ai::mojom::OcrClientType::kPdfViewer);
- screen_ai_annotator_.set_disconnect_handler(
- base::BindOnce(&PdfViewWebPluginClient::OnOcrDisconnected,
- weak_factory_.GetWeakPtr()));
- }
-}
void PdfViewWebPluginClient::UpdateTextInputState() {
@@ -1068,10 +1121,12 @@
namespace blink {
class WebLocalFrame;
@@ -87,16 +86,10 @@ class PdfViewWebPluginClient : public ch
@@ -87,19 +86,10 @@ class PdfViewWebPluginClient : public ch
chrome_pdf::PdfAccessibilityImageFetcher* image_fetcher,
blink::WebPluginContainer* plugin_element,
bool print_preview) override;
- void GetOcrMaxImageDimension(
- base::OnceCallback<void(uint32_t)> callback) override;
- void PerformOcr(
- const SkBitmap& image,
- base::OnceCallback<void(screen_ai::mojom::VisualAnnotationPtr)> callback)
@@ -1082,10 +1137,11 @@
blink::WebLocalFrame* GetFrame() const;
- void OnOcrDisconnected();
- void ConnectOcrIfNeeded();
const raw_ptr<content::RenderFrame> render_frame_;
@@ -105,8 +98,6 @@ class PdfViewWebPluginClient : public ch
@@ -108,8 +98,6 @@ class PdfViewWebPluginClient : public ch
raw_ptr<blink::WebPluginContainer> plugin_container_;
@@ -1107,7 +1163,7 @@
fuzzer_test("update_client_protocol_serializer_fuzzer") {
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -830,10 +830,6 @@ if (is_apple) {
@@ -825,10 +825,6 @@ if (is_apple) {
deps = [ "//third_party/icu:icudata" ]
}
@@ -1130,19 +1186,22 @@
page_objects.links = page->GetLinkInfo(text_runs);
--- a/pdf/pdf_view_web_plugin.cc
+++ b/pdf/pdf_view_web_plugin.cc
@@ -1348,11 +1348,6 @@ void PdfViewWebPlugin::DocumentLoadCompl
@@ -1378,14 +1378,6 @@ void PdfViewWebPlugin::DocumentLoadCompl
if (accessibility_state_ == AccessibilityState::kPending)
LoadAccessibility();
- // To avoid delaying page load for searchify, start searchify after document
- // load is completed.
- // Maximum image dimension is asked once and stored for the next usages, so
- // `BindOnce` is sufficient.
- client_->SetOcrDisconnectedCallback(engine_->GetOcrDisconnectHandler());
- engine_->StartSearchify(
- base::BindOnce(&Client::GetOcrMaxImageDimension, client_->GetWeakPtr()),
- base::BindRepeating(&Client::PerformOcr, client_->GetWeakPtr()));
if (!full_frame_)
return;
@@ -2446,7 +2441,7 @@ void PdfViewWebPlugin::EnableAccessibili
@@ -2482,7 +2474,7 @@ void PdfViewWebPlugin::EnableAccessibili
SkBitmap PdfViewWebPlugin::GetImageForOcr(int32_t page_index,
int32_t page_object_index) {
@@ -1151,7 +1210,7 @@
}
void PdfViewWebPlugin::HandleAccessibilityAction(
@@ -2973,19 +2968,6 @@ void PdfViewWebPlugin::PrepareAndSetAcce
@@ -3001,19 +2993,6 @@ void PdfViewWebPlugin::PrepareAndSetAcce
return;
}
@@ -1173,25 +1232,26 @@
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -2697,7 +2697,7 @@ void PDFiumEngine::HandleLongPress(const
SkBitmap PDFiumEngine::GetImageForOcr(int page_index, int image_index) {
DCHECK(PageIndexInBounds(page_index));
- return pages_[page_index]->GetImageForOcr(image_index);
@@ -2674,8 +2674,7 @@ SkBitmap PDFiumEngine::GetImageForOcr(in
// This function is not used after launch of PDF Searchify. Default OCR
// expected resolution is used to avoid unnecessary update of the call chain.
// TODO(crbug.com/360803943): Remove this function and call chain.
- return pages_[page_index]->GetImageForOcr(image_index,
- /*max_image_dimension=*/2048);
+ return SkBitmap();
}
bool PDFiumEngine::GetPrintScaling() {
--- a/services/passage_embeddings/passage_embeddings_service.cc
+++ b/services/passage_embeddings/passage_embeddings_service.cc
@@ -22,7 +22,6 @@ PassageEmbeddingsService::PassageEmbeddi
PassageEmbeddingsService::~PassageEmbeddingsService() = default;
@@ -23,7 +23,6 @@ PassageEmbeddingsService::~PassageEmbedd
#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
void PassageEmbeddingsService::OnEmbedderDisconnect() {
- embedder_.reset();
}
#endif
void PassageEmbeddingsService::LoadModels(
--- a/services/passage_embeddings/passage_embeddings_service.h
+++ b/services/passage_embeddings/passage_embeddings_service.h
@@ -11,7 +11,6 @@
@@ -2,7 +2,7 @@
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -606,8 +606,6 @@ static_library("browser") {
@@ -613,8 +613,6 @@ static_library("browser") {
"infobars/simple_alert_infobar_creator.h",
"interstitials/chrome_settings_page_helper.cc",
"interstitials/chrome_settings_page_helper.h",
@@ -11,7 +11,7 @@
"invalidation/profile_invalidation_provider_factory.cc",
"invalidation/profile_invalidation_provider_factory.h",
"k_anonymity_service/k_anonymity_service_client.cc",
@@ -2313,7 +2311,6 @@ static_library("browser") {
@@ -2346,7 +2344,6 @@ static_library("browser") {
"//components/resources",
"//components/safe_browsing/content/browser",
"//components/safe_browsing/content/browser:safe_browsing_service",
@@ -19,7 +19,7 @@
"//components/safe_browsing/content/browser/password_protection",
"//components/safe_browsing/content/browser/web_ui",
"//components/safe_browsing/content/common/proto:download_file_types_proto",
@@ -3903,10 +3900,6 @@ static_library("browser") {
@@ -3956,10 +3953,6 @@ static_library("browser") {
"new_tab_page/modules/modules_switches.h",
"new_tab_page/modules/new_tab_page_modules.cc",
"new_tab_page/modules/new_tab_page_modules.h",
@@ -30,7 +30,7 @@
"new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.cc",
"new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.h",
"new_tab_page/modules/v2/calendar/calendar_fake_data_helper.cc",
@@ -8515,7 +8508,6 @@ static_library("browser_generated_files"
@@ -8621,7 +8614,6 @@ static_library("browser_generated_files"
"//chrome/browser/new_tab_page/chrome_colors:generate_chrome_colors_info",
"//chrome/browser/new_tab_page/chrome_colors:generate_colors_info",
"//chrome/browser/new_tab_page/modules/file_suggestion:mojo_bindings",
@@ -38,7 +38,7 @@
"//chrome/browser/new_tab_page/modules/v2/authentication:mojo_bindings",
"//chrome/browser/new_tab_page/modules/v2/calendar:mojo_bindings",
"//chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption:mojo_bindings",
@@ -9005,8 +8997,6 @@ static_library("test_support") {
@@ -9116,8 +9108,6 @@ static_library("test_support") {
"//components/reporting/util:status",
"//components/reporting/util:status_macros",
"//components/reporting/util:task_runner_context",
@@ -82,7 +82,7 @@
using ConnectionType = net::NetworkChangeNotifier::ConnectionType;
#if BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION)
@@ -1840,7 +1839,6 @@ void ChromeDownloadManagerDelegate::OnDo
@@ -1873,7 +1872,6 @@ void ChromeDownloadManagerDelegate::OnDo
DownloadItemModel model(item);
model.DetermineAndSetShouldPreferOpeningInBrowser(
target_info.target_path, target_info.is_filetype_handled_safely);
@@ -90,7 +90,7 @@
}
if (ShouldBlockFile(item, target_info.danger_type)) {
MaybeReportDangerousDownloadBlocked(
@@ -1921,49 +1919,20 @@ bool ChromeDownloadManagerDelegate::IsOp
@@ -1954,49 +1952,20 @@ bool ChromeDownloadManagerDelegate::IsOp
bool ChromeDownloadManagerDelegate::ShouldBlockFile(
download::DownloadItem* item,
download::DownloadDangerType danger_type) const {
@@ -301,8 +301,8 @@
-#include "chrome/browser/safe_browsing/cloud_content_scanning/file_analysis_request.h"
-#include "chrome/browser/safe_browsing/download_protection/check_client_download_request.h"
#include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/grit/generated_resources.h"
#include "components/enterprise/buildflags/buildflags.h"
--- a/chrome/browser/enterprise/connectors/analysis/content_analysis_downloads_delegate.cc
+++ b/chrome/browser/enterprise/connectors/analysis/content_analysis_downloads_delegate.cc
@@ -126,7 +126,7 @@ ContentAnalysisDownloadsDelegate::GetCus
@@ -695,7 +695,7 @@
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -330,8 +330,6 @@ source_set("extensions") {
@@ -348,8 +348,6 @@ source_set("extensions") {
"management/management_util.h",
"manifest_check_level.h",
"mv2_experiment_stage.h",
@@ -703,7 +703,7 @@
- "omaha_attributes_handler.h",
"pack_extension_job.cc",
"pack_extension_job.h",
"permissions/permissions_updater.cc",
"permissions/active_tab_permission_granter.cc",
--- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
+++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
@@ -99,16 +99,8 @@ api::enterprise_reporting_private::Conte
@@ -749,15 +749,15 @@
void Blocklist::GetMalwareIDs(const std::set<ExtensionId>& ids,
--- a/chrome/browser/extensions/chrome_extension_system.cc
+++ b/chrome/browser/extensions/chrome_extension_system.cc
@@ -465,8 +465,6 @@ void ChromeExtensionSystem::PerformActio
@@ -463,8 +463,6 @@ void ChromeExtensionSystem::InstallUpdat
void ChromeExtensionSystem::PerformActionBasedOnOmahaAttributes(
const std::string& extension_id,
const base::Value::Dict& attributes) {
#if BUILDFLAG(ENABLE_EXTENSIONS)
// TODO(crbug.com/413460628): Port ExtensionService to desktop Android.
- extension_service()->PerformActionBasedOnOmahaAttributes(extension_id,
- attributes);
#else
NOTIMPLEMENTED();
#endif
}
} // namespace extensions
--- a/chrome/browser/extensions/extension_allowlist_factory.cc
+++ b/chrome/browser/extensions/extension_allowlist_factory.cc
@@ -45,7 +45,6 @@ ExtensionAllowlistFactory::ExtensionAllo
@@ -788,18 +788,19 @@
force_installed_tracker_(registry_, profile_),
force_installed_metrics_(registry_, profile_, &force_installed_tracker_),
corrupted_extension_reinstaller_(
@@ -358,10 +354,6 @@ void ExtensionService::Init() {
extensions_features::kDisableLoadExtensionCommandLineSwitch)) {
LOG(WARNING)
@@ -404,11 +400,6 @@ void ExtensionService::LoadExtensionsFro
<< "--load-extension is not allowed in Google Chrome, ignoring.";
- } else if (safe_browsing::IsEnhancedProtectionEnabled(
- *profile_->GetPrefs())) {
return;
}
- if (safe_browsing::IsEnhancedProtectionEnabled(*profile_->GetPrefs())) {
- VLOG(1) << "--load-extension is not allowed for users opted into "
- << "Enhanced Safe Browsing, ignoring.";
} else if (ShouldBlockCommandLineExtension(*profile_)) {
- return;
- }
if (ShouldBlockCommandLineExtension(*profile_)) {
// TODO(crbug.com/401529219): Deprecate this restriction once
// --load-extension switch is restricted on Chrome builds.
@@ -440,17 +432,6 @@ void ExtensionService::LoadSigninProfile
// --load-extension removal on Chrome builds is fully launched.
@@ -456,17 +447,6 @@ void ExtensionService::LoadSigninProfile
}
#endif
@@ -827,9 +828,9 @@
#include "chrome/browser/extensions/safe_browsing_verdict_handler.h"
#include "chrome/browser/profiles/profile_manager_observer.h"
#include "chrome/browser/upgrade_detector/upgrade_observer.h"
@@ -170,10 +169,6 @@ class ExtensionService : public Extensio
// nothing.
void EnableExtension(const std::string& extension_id);
@@ -166,10 +165,6 @@ class ExtensionService : public Extensio
// KeyedService two-phase shutdown.
void Shutdown();
- // Performs action based on Omaha attributes for the extension.
- void PerformActionBasedOnOmahaAttributes(const std::string& extension_id,
@@ -838,7 +839,7 @@
// Performs action based on verdicts received from the Extension Telemetry
// server. Currently, these verdicts are limited to off-store extensions.
void PerformActionBasedOnExtensionTelemetryServiceVerdicts(
@@ -371,8 +366,6 @@ class ExtensionService : public Extensio
@@ -374,8 +369,6 @@ class ExtensionService : public Extensio
ExtensionTelemetryServiceVerdictHandler
extension_telemetry_service_verdict_handler_;
@@ -900,7 +901,7 @@
}
--- a/chrome/browser/notifications/persistent_notification_handler.cc
+++ b/chrome/browser/notifications/persistent_notification_handler.cc
@@ -235,16 +235,6 @@ void PersistentNotificationHandler::Disa
@@ -307,16 +307,6 @@ void PersistentNotificationHandler::Disa
NotificationPermissionContext::UpdatePermission(profile, origin,
CONTENT_SETTING_BLOCK);
#endif
@@ -917,7 +918,7 @@
}
void PersistentNotificationHandler::OpenSettings(Profile* profile,
@@ -282,42 +272,6 @@ void PersistentNotificationHandler::OnMa
@@ -355,42 +345,6 @@ void PersistentNotificationHandler::OnMa
Profile* profile,
bool did_show_warning,
bool did_user_unsubscribe) {
@@ -962,31 +963,45 @@
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -773,24 +773,6 @@ void PlatformNotificationServiceImpl::Up
@@ -775,38 +775,8 @@ void PlatformNotificationServiceImpl::Up
std::unique_ptr<PersistentNotificationMetadata> persistent_metadata,
bool should_show_warning,
std::optional<std::string> serialized_content_detection_metadata) {
- if (base::FeatureList::IsEnabled(
- safe_browsing::kReportNotificationContentDetectionData) &&
- serialized_content_detection_metadata.has_value()) {
- scoped_refptr<content::PlatformNotificationContext> notification_context =
- profile_->GetStoragePartitionForUrl(notification.origin_url())
- ->GetPlatformNotificationContext();
- if (notification_context) {
- notification_context->WriteNotificationMetadata(
- notification.id(), notification.origin_url(),
- safe_browsing::kMetadataDictionaryKey,
- serialized_content_detection_metadata.value(),
- base::BindOnce(
- &PlatformNotificationServiceImpl::DidUpdatePersistentMetadata,
- weak_ptr_factory_.GetWeakPtr(), std::move(persistent_metadata),
- notification, should_show_warning));
- return;
- safe_browsing::kReportNotificationContentDetectionData)) {
- content::PlatformNotificationContext::WriteResourcesResultCallback
- callback = base::BindOnce(
- &PlatformNotificationServiceImpl::DidUpdatePersistentMetadata,
- weak_ptr_factory_.GetWeakPtr(), std::move(persistent_metadata),
- notification, should_show_warning);
-#if BUILDFLAG(IS_ANDROID)
- if (should_show_warning) {
- // Keep track of suspicious notification ids.
- safe_browsing::UpdateSuspiciousNotificationIds(
- HostContentSettingsMapFactory::GetForProfile(profile_),
- notification.origin_url(), notification.id());
- }
-#endif
- if (serialized_content_detection_metadata.has_value()) {
- scoped_refptr<content::PlatformNotificationContext> notification_context =
- profile_->GetStoragePartitionForUrl(notification.origin_url())
- ->GetPlatformNotificationContext();
- if (notification_context) {
- notification_context->WriteNotificationMetadata(
- notification.id(), notification.origin_url(),
- safe_browsing::kMetadataDictionaryKey,
- serialized_content_detection_metadata.value(), std::move(callback));
- return;
- }
- }
- std::move(callback).Run(/*success=*/false);
- } else {
DoUpdatePersistentMetadataThenDisplay(std::move(persistent_metadata),
notification, should_show_warning);
- }
DoUpdatePersistentMetadataThenDisplay(std::move(persistent_metadata),
notification, should_show_warning);
}
void PlatformNotificationServiceImpl::LogPersistentNotificationShownMetrics(
--- a/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc
+++ b/chrome/browser/permissions/contextual_notification_permission_ui_selector.cc
@@ -16,7 +16,6 @@
@@ -1074,7 +1089,7 @@
--- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
@@ -463,55 +463,5 @@ bool PredictionBasedPermissionUiSelector
@@ -597,68 +597,6 @@ bool PredictionBasedPermissionUiSelector
PredictionSource PredictionBasedPermissionUiSelector::GetPredictionTypeToUse(
permissions::RequestType request_type) {
@@ -1089,12 +1104,12 @@
-
- if (request_type == permissions::RequestType::kNotifications &&
- !is_notification_cpss_enabled) {
- return PredictionSource::USE_NONE;
- return PredictionSource::kNoCpssModel;
- }
-
- if (request_type == permissions::RequestType::kGeolocation &&
- !is_geolocation_cpss_enabled) {
- return PredictionSource::USE_NONE;
- return PredictionSource::kNoCpssModel;
- }
-
- bool use_server_side = false;
@@ -1108,10 +1123,22 @@
-#endif // BUILDFLAG(IS_ANDROID)
- }
- if (use_server_side) {
- if (base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv1)) {
- return PredictionSource::USE_ONDEVICE_AI_AND_SERVER_SIDE;
- // Aiv3 takes priority over Aiv1 if both are enabled.
-#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
- if (request_type == permissions::RequestType::kNotifications &&
- base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv3)) {
- return PredictionSource::kOnDeviceAiv3AndServerSideModel;
- }
- return PredictionSource::USE_SERVER_SIDE;
- if (request_type == permissions::RequestType::kGeolocation &&
- base::FeatureList::IsEnabled(
- permissions::features::kPermissionsAIv3Geolocation)) {
- return PredictionSource::kOnDeviceAiv3AndServerSideModel;
- }
-#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
- if (base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv1)) {
- return PredictionSource::kOnDeviceAiv1AndServerSideModel;
- }
- return PredictionSource::kServerSideCpssV3Model;
- }
-
-#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
@@ -1124,15 +1151,16 @@
- permissions::features::kPermissionOnDeviceGeolocationPredictions);
- }
- if (use_ondevice_tflite) {
- return PredictionSource::USE_ONDEVICE_TFLITE;
- return PredictionSource::kOnDeviceCpssV1Model;
- }
-#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
-
return PredictionSource::USE_NONE;
return PredictionSource::kNoCpssModel;
}
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -2506,8 +2506,6 @@ std::unique_ptr<ConfigurationPolicyHandl
@@ -2494,8 +2494,6 @@ std::unique_ptr<ConfigurationPolicyHandl
handlers->AddHandler(
std::make_unique<bookmarks::ManagedBookmarksPolicyHandler>(
chrome_schema));
@@ -1143,7 +1171,7 @@
std::make_unique<URLBlocklistPolicyHandler>(key::kURLBlocklist));
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -283,7 +283,6 @@
@@ -284,7 +284,6 @@
#include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
#include "chrome/browser/new_tab_page/modules/file_suggestion/drive_service.h"
#include "chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files_page_handler.h"
@@ -1151,7 +1179,7 @@
#include "chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.h"
#include "chrome/browser/new_tab_page/modules/v2/calendar/google_calendar_page_handler.h"
#include "chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar_page_handler.h"
@@ -2054,7 +2053,6 @@ void RegisterProfilePrefs(user_prefs::Pr
@@ -2089,7 +2088,6 @@ void RegisterProfilePrefs(user_prefs::Pr
NewTabFooterUI::RegisterProfilePrefs(registry);
NewTabPageHandler::RegisterProfilePrefs(registry);
NewTabPageUI::RegisterProfilePrefs(registry);
@@ -1161,7 +1189,7 @@
promos_utils::RegisterProfilePrefs(registry);
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -854,9 +854,7 @@ void ChromeBrowserMainExtraPartsProfiles
@@ -867,9 +867,7 @@ void ChromeBrowserMainExtraPartsProfiles
enterprise_connectors::TelomereEventRouterFactory::GetInstance();
}
#endif
@@ -1173,7 +1201,7 @@
enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance();
--- a/chrome/browser/safe_browsing/BUILD.gn
+++ b/chrome/browser/safe_browsing/BUILD.gn
@@ -93,13 +93,6 @@ static_library("safe_browsing") {
@@ -94,13 +94,6 @@ static_library("safe_browsing") {
allow_circular_includes_from += [ "//chrome/browser/ash/file_manager" ]
}
@@ -1338,7 +1366,7 @@
// certificate. So, when users click proceed on an interstitial, move the tab
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -4585,8 +4585,6 @@ static_library("ui") {
@@ -4535,8 +4535,6 @@ static_library("ui") {
"views/safe_browsing/prompt_for_scanning_modal_dialog.h",
"views/safe_browsing/tailored_security_desktop_dialog_manager.cc",
"views/safe_browsing/tailored_security_desktop_dialog_manager.h",
@@ -1357,7 +1385,7 @@
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "revoked_permissions_service.h"
@@ -386,34 +385,6 @@ RevokedPermissionsService::RevokedPermis
@@ -409,34 +408,6 @@ RevokedPermissionsService::RevokedPermis
base::Unretained(this)));
#endif // BUILDFLAG(IS_ANDROID)
@@ -1382,7 +1410,7 @@
- }
-
- if (base::FeatureList::IsEnabled(
- safe_browsing::kSafetyHubDisruptiveNotificationRevocation)) {
- features::kSafetyHubDisruptiveNotificationRevocation)) {
- disruptive_notification_manager_ =
- std::make_unique<DisruptiveNotificationPermissionsManager>(
- hcsm(),
@@ -1392,7 +1420,7 @@
bool migration_completed = pref_change_registrar_->prefs()->GetBoolean(
safety_hub_prefs::kUnusedSitePermissionsRevocationMigrationCompleted);
@@ -1154,9 +1125,7 @@ bool RevokedPermissionsService::IsUnused
@@ -1204,9 +1175,7 @@ bool RevokedPermissionsService::IsUnused
}
bool RevokedPermissionsService::IsAbusiveNotificationAutoRevocationEnabled() {
@@ -1415,7 +1443,7 @@
--- a/chrome/browser/ui/toasts/toast_service.cc
+++ b/chrome/browser/ui/toasts/toast_service.cc
@@ -33,7 +33,6 @@
@@ -34,7 +34,6 @@
#include "components/plus_addresses/features.h"
#include "components/plus_addresses/grit/plus_addresses_strings.h"
#include "components/safe_browsing/core/common/features.h"
@@ -1423,7 +1451,7 @@
#include "components/strings/grit/components_strings.h"
#include "components/tabs/public/tab_interface.h"
#include "components/vector_icons/vector_icons.h"
@@ -140,57 +139,6 @@ void ToastService::RegisterToasts(
@@ -146,57 +145,6 @@ void ToastService::RegisterToasts(
.Build());
}
@@ -1620,7 +1648,7 @@
#include "components/safe_browsing/core/browser/db/database_manager.h"
#include "content/public/browser/web_contents.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
@@ -208,11 +210,13 @@ void ShareServiceImpl::Share(const std::
@@ -210,11 +212,13 @@ void ShareServiceImpl::Share(const std::
// Check if at least one file is marked by the download protection service
// to send a ping to check this file type.
@@ -1634,7 +1662,7 @@
// In the case where the original blob handle was to a native file (of
// unknown size), the serialized data does not contain an accurate file
@@ -222,6 +226,7 @@ void ShareServiceImpl::Share(const std::
@@ -224,6 +228,7 @@ void ShareServiceImpl::Share(const std::
}
DCHECK(!safe_browsing_request_);
@@ -1642,7 +1670,7 @@
if (should_check_url && g_browser_process->safe_browsing_service()) {
safe_browsing_request_.emplace(
g_browser_process->safe_browsing_service()->database_manager(),
@@ -231,6 +236,7 @@ void ShareServiceImpl::Share(const std::
@@ -233,6 +238,7 @@ void ShareServiceImpl::Share(const std::
std::move(files), std::move(callback)));
return;
}
@@ -1662,7 +1690,7 @@
kChromeUITabSearchHost,
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -2523,7 +2523,6 @@ if (!is_android) {
@@ -2558,7 +2558,6 @@ if (!is_android) {
"//components/resources",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/content/browser",
@@ -1670,7 +1698,7 @@
"//components/safe_browsing/content/browser:safe_browsing_service",
"//components/safe_browsing/content/browser/password_protection",
"//components/safe_browsing/content/browser/password_protection:test_support",
@@ -6871,7 +6870,6 @@ test("unit_tests") {
@@ -6921,7 +6920,6 @@ test("unit_tests") {
"//components/resources",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/content/browser",
@@ -1751,7 +1779,7 @@
- safe_browsing::SafeBrowsingState safe_browsing_protection_level;
bool site_isolation_enabled;
// Enterprise cloud content analysis exclusive
// Enterprise cloud content analysis exclusives
--- a/components/enterprise/browser/reporting/chrome_profile_request_generator.cc
+++ b/components/enterprise/browser/reporting/chrome_profile_request_generator.cc
@@ -229,16 +229,10 @@ void ChromeProfileRequestGenerator::OnAg
@@ -1770,7 +1798,7 @@
- profile_signals.safe_browsing_protection_level));
profile_signals_report->set_site_isolation_enabled(
profile_signals.site_isolation_enabled);
profile_report->set_allocated_profile_signals_report(
--- a/components/enterprise/browser/reporting/report_util.cc
+++ b/components/enterprise/browser/reporting/report_util.cc
@@ -80,25 +80,6 @@ em::SettingValue TranslateSettingValue(
@@ -1875,7 +1903,7 @@
const base::Value::List* enabled_opt_in_events_value =
--- a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
+++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
@@ -336,12 +336,7 @@ bool LeakDetectionCheck::IsURLBlockedByP
@@ -314,12 +314,7 @@ bool LeakDetectionCheck::IsURLBlockedByP
const PrefService& prefs,
const GURL& form_url,
autofill::SavePasswordProgressLogger* logger) {
@@ -2032,7 +2060,7 @@
void RealTimeUrlLookupService::MaybeFillReferringWebApk(
--- a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
+++ b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
@@ -595,17 +595,6 @@ void RealTimeUrlLookupServiceBase::Start
@@ -593,17 +593,6 @@ void RealTimeUrlLookupServiceBase::Start
request->set_report_type(is_sampled_report ? RTLookupRequest::SAMPLED_REPORT
: RTLookupRequest::FULL_REPORT);
request->set_frame_type(RTLookupRequest::MAIN_FRAME);
@@ -0,0 +1,10 @@
--- a/chrome/browser/ui/views/accelerator_table.cc
+++ b/chrome/browser/ui/views/accelerator_table.cc
@@ -132,7 +132,6 @@ const AcceleratorMapping kAcceleratorMap
{ui::VKEY_OEM_PLUS, ui::EF_PLATFORM_ACCELERATOR, IDC_ZOOM_PLUS},
{ui::VKEY_ADD, ui::EF_PLATFORM_ACCELERATOR, IDC_ZOOM_PLUS},
- {ui::VKEY_F1, ui::EF_NONE, IDC_HELP_PAGE_VIA_KEYBOARD},
{ui::VKEY_F3, ui::EF_NONE, IDC_FIND_NEXT},
{ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS},
{ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB},
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
# Disables translation and removes the "Translate to" context menu when --translate-script-url flag is not set
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -174,6 +174,7 @@
@@ -171,6 +171,7 @@
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/browser/supervised_user_service.h"
#include "components/supervised_user/core/browser/supervised_user_url_filter.h"
@@ -9,7 +9,7 @@
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/browser/translate_prefs.h"
@@ -2242,6 +2243,7 @@ void RenderViewContextMenu::AppendPageIt
@@ -2281,6 +2282,7 @@ void RenderViewContextMenu::AppendPageIt
}
if (CanTranslate(/*menu_logging=*/true)) {
@@ -47,7 +47,7 @@
request_pending_ = true;
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
@@ -837,8 +837,9 @@ void TranslateManager::FilterIsTranslate
@@ -821,8 +821,9 @@ void TranslateManager::FilterIsTranslate
TriggerDecision::kDisabledOffline);
}
+122 -120
View File
@@ -39,21 +39,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "base/values.h"
+#include "chrome/common/importer/chrome_importer_utils.h"
+#include "chrome/common/importer/importer_constants.h"
+#include "chrome/common/importer/importer_type.h"
+#include "components/user_data_importer/common/importer_type.h"
+#include "chrome/grit/generated_resources.h"
+#include "ui/base/l10n/l10n_util.h"
+
+namespace {
+void AddChromeToProfiles(std::vector<importer::SourceProfile>* profiles,
+void AddChromeToProfiles(std::vector<user_data_importer::SourceProfile>* profiles,
+ base::Value::List chrome_profiles,
+ const base::FilePath& user_data_folder,
+ const std::string& brand,
+ importer::ImporterType type) {
+ user_data_importer::ImporterType type) {
+ for (const auto& value : chrome_profiles) {
+ const auto* dict = value.GetIfDict();
+ if (!dict)
+ continue;
+ uint16_t items = importer::NONE;
+ uint16_t items = user_data_importer::NONE;
+ auto* profile = dict->FindString("id");
+ auto* name = dict->FindString("name");
+ DCHECK(profile);
@@ -66,11 +66,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
+ // We can import password from Whale only on macOS.
+ // Decryption failed on Windows and Linux.
+ if (type == importer::TYPE_WHALE && (items & importer::PASSWORDS)) {
+ items ^= importer::PASSWORDS;
+ if (type == user_data_importer::TYPE_WHALE && (items & user_data_importer::PASSWORDS)) {
+ items ^= user_data_importer::PASSWORDS;
+ }
+#endif
+ importer::SourceProfile chrome;
+ user_data_importer::SourceProfile chrome;
+ chrome.importer_name = base::UTF8ToUTF16(brand);
+ chrome.importer_type = type;
+ chrome.source_path = user_data_folder.Append(
@@ -81,82 +81,82 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
+}
+
+void DetectChromeProfiles(std::vector<importer::SourceProfile>* profiles) {
+void DetectChromeProfiles(std::vector<user_data_importer::SourceProfile>* profiles) {
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::WILL_BLOCK);
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetChromeUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetChromeUserDataFolder(), kGoogleChromeBrowser, importer::TYPE_CHROME);
+ GetChromeUserDataFolder(), kGoogleChromeBrowser, user_data_importer::TYPE_CHROME);
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetChromeBetaUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetChromeBetaUserDataFolder(), kGoogleChromeBrowserBeta,
+ importer::TYPE_CHROME);
+ user_data_importer::TYPE_CHROME);
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetChromeDevUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetChromeDevUserDataFolder(), kGoogleChromeBrowserDev,
+ importer::TYPE_CHROME);
+ user_data_importer::TYPE_CHROME);
+#if !BUILDFLAG(IS_LINUX)
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetCanaryUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetCanaryUserDataFolder(), kGoogleChromeBrowserCanary,
+ importer::TYPE_CHROME);
+ user_data_importer::TYPE_CHROME);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetArcUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetArcUserDataFolder(), kArcBrowser, importer::TYPE_ARC);
+ GetArcUserDataFolder(), kArcBrowser, user_data_importer::TYPE_ARC);
+#endif
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetChromiumUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetChromiumUserDataFolder(), kChromiumBrowser, importer::TYPE_CHROME);
+ GetChromiumUserDataFolder(), kChromiumBrowser, user_data_importer::TYPE_CHROME);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetEdgeUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetEdgeUserDataFolder(), kMicrosoftEdgeBrowser,
+ importer::TYPE_EDGE_CHROMIUM);
+ user_data_importer::TYPE_EDGE_CHROMIUM);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetVivaldiUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetVivaldiUserDataFolder(), kVivaldiBrowser, importer::TYPE_VIVALDI);
+ GetVivaldiUserDataFolder(), kVivaldiBrowser, user_data_importer::TYPE_VIVALDI);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetOperaUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetOperaUserDataFolder(), kOperaBrowser, importer::TYPE_OPERA);
+ GetOperaUserDataFolder(), kOperaBrowser, user_data_importer::TYPE_OPERA);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetYandexUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetYandexUserDataFolder(), kYandexBrowser, importer::TYPE_YANDEX);
+ GetYandexUserDataFolder(), kYandexBrowser, user_data_importer::TYPE_YANDEX);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetWhaleUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetWhaleUserDataFolder(), kWhaleBrowser, importer::TYPE_WHALE);
+ GetWhaleUserDataFolder(), kWhaleBrowser, user_data_importer::TYPE_WHALE);
+
+ AddChromeToProfiles(
+ profiles,
+ GetChromeSourceProfiles(GetBraveUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetBraveUserDataFolder(), kBraveBrowser, importer::TYPE_BRAVE);
+ GetBraveUserDataFolder(), kBraveBrowser, user_data_importer::TYPE_BRAVE);
+
+#if BUILDFLAG(IS_LINUX)
+ // Installed via snap Opera has different profile path.
@@ -164,7 +164,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ profiles,
+ GetChromeSourceProfiles(GetOperaSnapUserDataFolder().Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
+ GetOperaSnapUserDataFolder(), kOperaBrowser, importer::TYPE_OPERA);
+ GetOperaSnapUserDataFolder(), kOperaBrowser, user_data_importer::TYPE_OPERA);
+#endif
+}
+
@@ -189,7 +189,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "base/values.h"
+#include "chrome/common/importer/importer_constants.h"
+#include "chrome/common/importer/scoped_copy_file.h"
+#include "chrome/common/importer/importer_data_types.h"
+#include "components/user_data_importer/common/importer_data_types.h"
+#include "components/webdata/common/webdata_constants.h"
+#include "sql/database.h"
+#include "sql/statement.h"
@@ -354,7 +354,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+bool ChromeImporterCanImport(const base::FilePath& profile,
+ uint16_t* services_supported) {
+ DCHECK(services_supported);
+ *services_supported = importer::NONE;
+ *services_supported = user_data_importer::NONE;
+
+ base::FilePath bookmarks =
+ profile.Append(base::FilePath::StringType(FILE_PATH_LITERAL("Bookmarks")));
@@ -365,18 +365,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ base::FilePath passwords_for_account = profile.Append(
+ base::FilePath::StringType(FILE_PATH_LITERAL("Login Data For Account")));
+ if (base::PathExists(bookmarks))
+ *services_supported |= importer::FAVORITES;
+ *services_supported |= user_data_importer::FAVORITES;
+ if (base::PathExists(history))
+ *services_supported |= importer::HISTORY;
+ *services_supported |= user_data_importer::HISTORY;
+ if (base::PathExists(passwords) || base::PathExists(passwords_for_account)) {
+ *services_supported |= importer::PASSWORDS;
+ *services_supported |= user_data_importer::PASSWORDS;
+ }
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ if (HasImportableExtensions(profile))
+ *services_supported |= importer::EXTENSIONS;
+ *services_supported |= user_data_importer::EXTENSIONS;
+#endif
+
+ return *services_supported != importer::NONE;
+ return *services_supported != user_data_importer::NONE;
+}
+
+#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -936,7 +936,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ const base::FilePath& library_dir = base::apple::GetUserLibraryPath();
+ const base::FilePath safari_dir = library_dir.Append("Safari");
+
+ if (imported_items & importer::FAVORITES) {
+ if (imported_items & user_data_importer::FAVORITES) {
+ const base::FilePath bookmarks_path = safari_dir.Append("Bookmarks.plist");
+ if (!PathIsWritable(bookmarks_path)) {
+ LOG(ERROR) << __func__ << " " << bookmarks_path << " is not accessible."
@@ -945,7 +945,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
+ }
+
+ if (imported_items & importer::HISTORY) {
+ if (imported_items & user_data_importer::HISTORY) {
+ const base::FilePath history_path = safari_dir.Append("History.plist");
+ if (!PathIsWritable(history_path)) {
+ LOG(ERROR) << __func__ << " " << history_path << " is not accessible."
@@ -967,7 +967,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+BraveImportDataHandler::~BraveImportDataHandler() = default;
+
+void BraveImportDataHandler::StartImport(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items) {
+ if (!imported_items)
+ return;
@@ -984,7 +984,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+void BraveImportDataHandler::StartImportImpl(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items,
+ Profile* profile) {
+ // If another import is already ongoing, let it finish silently.
@@ -1004,7 +1004,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+void BraveImportDataHandler::NotifyImportProgress(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ const base::Value::Dict& info) {
+ const std::string* event = info.FindString("event");
+ if (!event)
@@ -1023,14 +1023,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+void BraveImportDataHandler::OnImportEnded(
+ const importer::SourceProfile& source_profile) {
+ const user_data_importer::SourceProfile& source_profile) {
+ import_observers_.erase(source_profile.source_path);
+ FireWebUIListener("import-data-status-changed",
+ base::Value(import_did_succeed_ ? kImportStatusSucceeded
+ : kImportStatusFailed));
+}
+
+const importer::SourceProfile& BraveImportDataHandler::GetSourceProfileAt(
+const user_data_importer::SourceProfile& BraveImportDataHandler::GetSourceProfileAt(
+ int browser_index) {
+ return importer_list_->GetSourceProfileAt(browser_index);
+}
@@ -1039,13 +1039,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+void BraveImportDataHandler::CheckDiskAccess(
+ uint16_t imported_items,
+ base::FilePath source_path,
+ importer::ImporterType importer_type,
+ user_data_importer::ImporterType importer_type,
+ ContinueImportCallback callback) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+
+ guide_dialog_is_requested_ = false;
+
+ if (importer_type == importer::TYPE_SAFARI) {
+ if (importer_type == user_data_importer::TYPE_SAFARI) {
+ // Start import if Brave has full disk access permission.
+ // If not, show dialog that has infos about that permission.
+ base::ThreadPool::PostTaskAndReplyWithResult(
@@ -1143,26 +1143,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ protected:
+ using ContinueImportCallback = base::OnceCallback<void()>;
+
+ const importer::SourceProfile& GetSourceProfileAt(int browser_index);
+ const user_data_importer::SourceProfile& GetSourceProfileAt(int browser_index);
+ void HandleImportData(const base::Value::List& args);
+ // ImportDataHandler overrides:
+ void StartImport(const importer::SourceProfile& source_profile,
+ void StartImport(const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items) override;
+
+ void StartImportImpl(const importer::SourceProfile& source_profile,
+ void StartImportImpl(const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items,
+ Profile* profile);
+ virtual void NotifyImportProgress(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ const base::Value::Dict& info);
+ virtual void OnImportEnded(const importer::SourceProfile& source_profile);
+ virtual void OnImportEnded(const user_data_importer::SourceProfile& source_profile);
+
+ void OnStartImport(const importer::SourceProfile& source_profile,
+ void OnStartImport(const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items);
+#if BUILDFLAG(IS_MAC)
+ void CheckDiskAccess(uint16_t imported_items,
+ base::FilePath source_path,
+ importer::ImporterType importer_type,
+ user_data_importer::ImporterType importer_type,
+ ContinueImportCallback callback);
+ void OnGetDiskAccessPermission(ContinueImportCallback callback,
+ base::FilePath source_path,
@@ -1199,7 +1199,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+BraveImporterObserver::BraveImporterObserver(
+ ExternalProcessImporterHost* importer_host,
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items,
+ ReportProgressCallback callback)
+ : source_profile_(source_profile),
@@ -1215,7 +1215,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ importer_host_->set_observer(nullptr);
+}
+
+// importer::ImporterProgressObserver:
+// user_data_importer::ImporterProgressObserver:
+void BraveImporterObserver::ImportStarted() {
+ if (import_started_called_)
+ return;
@@ -1228,7 +1228,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ callback_.Run(source_profile_, data);
+}
+
+void BraveImporterObserver::ImportItemStarted(importer::ImportItem item) {
+void BraveImporterObserver::ImportItemStarted(user_data_importer::ImportItem item) {
+ base::Value::Dict data;
+ data.Set("importer_name", source_profile_.importer_name);
+ data.Set("importer_type", source_profile_.importer_type);
@@ -1238,7 +1238,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ callback_.Run(source_profile_, data);
+}
+
+void BraveImporterObserver::ImportItemEnded(importer::ImportItem item) {
+void BraveImporterObserver::ImportItemEnded(user_data_importer::ImportItem item) {
+ base::Value::Dict data;
+ data.Set("importer_name", source_profile_.importer_name);
+ data.Set("importer_type", source_profile_.importer_type);
@@ -1290,18 +1290,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+class BraveImporterObserver : public importer::ImporterProgressObserver {
+ public:
+ using ReportProgressCallback = base::RepeatingCallback<void(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ const base::Value::Dict&)>;
+
+ BraveImporterObserver(ExternalProcessImporterHost* host,
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t imported_items,
+ ReportProgressCallback callback);
+ ~BraveImporterObserver() override;
+
+ void ImportStarted() override;
+ void ImportItemStarted(importer::ImportItem item) override;
+ void ImportItemEnded(importer::ImportItem item) override;
+ void ImportItemStarted(user_data_importer::ImportItem item) override;
+ void ImportItemEnded(user_data_importer::ImportItem item) override;
+ void ImportEnded() override;
+
+ private:
@@ -1309,7 +1309,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ ExternalProcessImporterHost* GetImporterHostForTesting();
+
+ importer::SourceProfile source_profile_;
+ user_data_importer::SourceProfile source_profile_;
+ uint16_t imported_items_ = 0;
+ ReportProgressCallback callback_;
+ // By some reasons ImportStarted event is called few times from different
@@ -1339,16 +1339,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "content/public/browser/service_process_host.h"
+
+namespace {
+bool ShouldUseBraveImporter(importer::ImporterType type) {
+bool ShouldUseBraveImporter(user_data_importer::ImporterType type) {
+ switch (type) {
+ case importer::TYPE_CHROME:
+ case importer::TYPE_EDGE_CHROMIUM:
+ case importer::TYPE_VIVALDI:
+ case importer::TYPE_OPERA:
+ case importer::TYPE_YANDEX:
+ case importer::TYPE_WHALE:
+ case importer::TYPE_ARC:
+ case importer::TYPE_BRAVE:
+ case user_data_importer::TYPE_CHROME:
+ case user_data_importer::TYPE_EDGE_CHROMIUM:
+ case user_data_importer::TYPE_VIVALDI:
+ case user_data_importer::TYPE_OPERA:
+ case user_data_importer::TYPE_YANDEX:
+ case user_data_importer::TYPE_WHALE:
+ case user_data_importer::TYPE_ARC:
+ case user_data_importer::TYPE_BRAVE:
+ return true;
+ default:
+ return false;
@@ -1364,7 +1364,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+BraveExternalProcessImporterClient::BraveExternalProcessImporterClient(
+ base::WeakPtr<ExternalProcessImporterHost> importer_host,
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ InProcessImporterBridge* bridge)
+ : ExternalProcessImporterClient(
@@ -1422,7 +1422,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+void BraveExternalProcessImporterClient::OnImportItemFinished(
+ importer::ImportItem import_item) {
+ user_data_importer::ImportItem import_item) {
+ if (!ShouldUseBraveImporter(source_profile_.importer_type)) {
+ ExternalProcessImporterClient::OnImportItemFinished(import_item);
+ return;
@@ -1458,7 +1458,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ public:
+ BraveExternalProcessImporterClient(
+ base::WeakPtr<ExternalProcessImporterHost> importer_host,
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ InProcessImporterBridge* bridge);
+
@@ -1471,7 +1471,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ void Start() override;
+ void Cancel() override;
+ void CloseMojoHandles() override;
+ void OnImportItemFinished(importer::ImportItem import_item) override;
+ void OnImportItemFinished(user_data_importer::ImportItem import_item) override;
+
+ protected:
+ ~BraveExternalProcessImporterClient() override;
@@ -1607,7 +1607,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
+
+ if (!ids.empty() && observer_)
+ observer_->ImportItemEnded(importer::EXTENSIONS);
+ observer_->ImportItemEnded(user_data_importer::EXTENSIONS);
+
+ ExternalProcessImporterHost::NotifyImportEnded();
+}
@@ -1637,7 +1637,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ // Handling extensions importing after finishing all other properties makes
+ // logic simpler.
+ // Don't import if cancelled.
+ if (!cancelled_ && (items_ & importer::EXTENSIONS)) {
+ if (!cancelled_ && (items_ & user_data_importer::EXTENSIONS)) {
+ LaunchExtensionsImport();
+ return;
+ }
@@ -1807,9 +1807,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/tab_modal_confirm_dialog.h"
+#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
+#include "chrome/common/importer/importer_data_types.h"
+#include "chrome/grit/generated_resources.h"
+#include "content/public/browser/web_ui.h"
+#include "components/user_data_importer/common/importer_data_types.h"
+#include "ui/base/ui_base_types.h"
+#include "url/gurl.h"
+
@@ -2071,33 +2071,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "chrome/utility/importer/brave_external_process_importer_bridge.h"
+#include "chrome/utility/importer/chrome_importer.h"
+#include "build/build_config.h"
+#include "chrome/common/importer/importer_type.h"
+#include "chrome/common/importer/profile_import.mojom.h"
+#include "chrome/utility/importer/external_process_importer_bridge.h"
+#include "chrome/utility/importer/importer.h"
+#include "components/user_data_importer/common/importer_type.h"
+#include "content/public/utility/utility_thread.h"
+#include "mojo/public/cpp/bindings/remote.h"
+#include "mojo/public/cpp/bindings/shared_remote.h"
+
+namespace {
+
+scoped_refptr<Importer> CreateImporterByType(importer::ImporterType type) {
+scoped_refptr<Importer> CreateImporterByType(user_data_importer::ImporterType type) {
+ switch (type) {
+ case importer::TYPE_CHROME:
+ case user_data_importer::TYPE_CHROME:
+ return new ChromeImporter();
+ case importer::TYPE_EDGE_CHROMIUM:
+ case user_data_importer::TYPE_EDGE_CHROMIUM:
+ return new ChromeImporter();
+ case importer::TYPE_VIVALDI:
+ case user_data_importer::TYPE_VIVALDI:
+ return new ChromeImporter();
+ case importer::TYPE_OPERA:
+ case user_data_importer::TYPE_OPERA:
+ return new ChromeImporter();
+ case importer::TYPE_YANDEX:
+ case user_data_importer::TYPE_YANDEX:
+ return new ChromeImporter();
+ case importer::TYPE_WHALE:
+ case user_data_importer::TYPE_WHALE:
+ return new ChromeImporter();
+ case importer::TYPE_ARC:
+ case user_data_importer::TYPE_ARC:
+ return new ChromeImporter();
+ case importer::TYPE_BRAVE:
+ case user_data_importer::TYPE_BRAVE:
+ return new ChromeImporter();
+ default:
+ break;
@@ -2114,7 +2114,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+BraveProfileImportImpl::~BraveProfileImportImpl() = default;
+
+void BraveProfileImportImpl::StartImport(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ const base::flat_map<uint32_t, std::string>& localized_strings,
+ mojo::PendingRemote<chrome::mojom::ProfileImportObserver> observer) {
@@ -2122,21 +2122,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ if (source_profile.importer_name.starts_with(u"Chrome")) {
+ command_line->AppendSwitch("import-chrome");
+ } else if (source_profile.importer_type == importer::TYPE_EDGE_CHROMIUM) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_EDGE_CHROMIUM) {
+ command_line->AppendSwitch("import-edge");
+ } else if (source_profile.importer_name.starts_with(u"Chromium")) {
+ command_line->AppendSwitch("import-chromium");
+ } else if (source_profile.importer_type == importer::TYPE_OPERA) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_OPERA) {
+ command_line->AppendSwitch("import-opera");
+ } else if (source_profile.importer_type == importer::TYPE_YANDEX) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_YANDEX) {
+ command_line->AppendSwitch("import-yandex");
+ } else if (source_profile.importer_type == importer::TYPE_WHALE) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_WHALE) {
+ command_line->AppendSwitch("import-whale");
+ } else if (source_profile.importer_type == importer::TYPE_ARC) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_ARC) {
+ command_line->AppendSwitch("import-arc");
+ } else if (source_profile.importer_type == importer::TYPE_BRAVE) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_BRAVE) {
+ command_line->AppendSwitch("import-brave");
+ } else if (source_profile.importer_type == importer::TYPE_VIVALDI) {
+ } else if (source_profile.importer_type == user_data_importer::TYPE_VIVALDI) {
+ command_line->AppendSwitch("import-vivaldi");
+ }
+
@@ -2171,7 +2171,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
+
+void BraveProfileImportImpl::ReportImportItemFinished(
+ importer::ImportItem item) {
+ user_data_importer::ImportItem item) {
+ items_to_import_ ^= item; // Remove finished item from mask.
+ if (items_to_import_ == 0) {
+ ImporterCleanup();
@@ -2226,13 +2226,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ private:
+ // chrome::mojom::ChromeProfileImport overrides:
+ void StartImport(
+ const importer::SourceProfile& source_profile,
+ const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ const base::flat_map<uint32_t, std::string>& localized_strings,
+ mojo::PendingRemote<chrome::mojom::ProfileImportObserver> observer)
+ override;
+ void CancelImport() override;
+ void ReportImportItemFinished(importer::ImportItem item) override;
+ void ReportImportItemFinished(user_data_importer::ImportItem item) override;
+
+ void ImporterCleanup();
+
@@ -2243,7 +2243,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ // directly back to the ProfileImportProcessHost.
+ scoped_refptr<BraveExternalProcessImporterBridge> bridge_;
+
+ // A bitmask of importer::ImportItem.
+ // A bitmask of user_data_importer::ImportItem.
+ uint16_t items_to_import_ = 0;
+
+ // Importer of the appropriate type (Firefox, Safari, IE, etc.)
@@ -2324,10 +2324,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "chrome/common/importer/imported_bookmark_entry.h"
+#include "chrome/common/importer/importer_bridge.h"
+#include "chrome/common/importer/importer_data_types.h"
+#include "chrome/common/importer/importer_url_row.h"
+#include "chrome/common/importer/scoped_copy_file.h"
+#include "chrome/grit/generated_resources.h"
+#include "chrome/utility/importer/brave_external_process_importer_bridge.h"
@@ -2338,6 +2335,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "components/password_manager/core/common/password_manager_pref_names.h"
+#include "components/prefs/json_pref_store.h"
+#include "components/prefs/pref_filter.h"
+#include "components/user_data_importer/common/imported_bookmark_entry.h"
+#include "components/user_data_importer/common/importer_data_types.h"
+#include "components/user_data_importer/common/importer_url_row.h"
+#include "components/webdata/common/webdata_constants.h"
+#include "sql/database.h"
+#include "sql/statement.h"
@@ -2446,16 +2446,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+bool PasswordFormToImportedPasswordForm(
+ const password_manager::PasswordForm& form,
+ importer::ImportedPasswordForm& imported_form) {
+ user_data_importer::ImportedPasswordForm& imported_form) {
+ if (form.scheme != password_manager::PasswordForm::Scheme::kHtml &&
+ form.scheme != password_manager::PasswordForm::Scheme::kBasic) {
+ return false;
+ }
+
+ if (form.scheme == password_manager::PasswordForm::Scheme::kHtml) {
+ imported_form.scheme = importer::ImportedPasswordForm::Scheme::kHtml;
+ imported_form.scheme = user_data_importer::ImportedPasswordForm::Scheme::kHtml;
+ } else {
+ imported_form.scheme = importer::ImportedPasswordForm::Scheme::kBasic;
+ imported_form.scheme = user_data_importer::ImportedPasswordForm::Scheme::kBasic;
+ }
+
+ imported_form.signon_realm = form.signon_realm;
@@ -2475,7 +2475,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ChromeImporter::~ChromeImporter() = default;
+
+void ChromeImporter::StartImport(const importer::SourceProfile& source_profile,
+void ChromeImporter::StartImport(const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ ImporterBridge* bridge) {
+ bridge_ = bridge;
@@ -2484,32 +2484,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ // The order here is important!
+ bridge_->NotifyStarted();
+
+ if ((items & importer::HISTORY) && !cancelled()) {
+ bridge_->NotifyItemStarted(importer::HISTORY);
+ if ((items & user_data_importer::HISTORY) && !cancelled()) {
+ bridge_->NotifyItemStarted(user_data_importer::HISTORY);
+ ImportHistory();
+ bridge_->NotifyItemEnded(importer::HISTORY);
+ bridge_->NotifyItemEnded(user_data_importer::HISTORY);
+ }
+
+ if ((items & importer::FAVORITES) && !cancelled()) {
+ bridge_->NotifyItemStarted(importer::FAVORITES);
+ if ((items & user_data_importer::FAVORITES) && !cancelled()) {
+ bridge_->NotifyItemStarted(user_data_importer::FAVORITES);
+ ImportBookmarks();
+ bridge_->NotifyItemEnded(importer::FAVORITES);
+ bridge_->NotifyItemEnded(user_data_importer::FAVORITES);
+ }
+
+#if BUILDFLAG(IS_WIN)
+ auto source_path = source_profile.importer_type == importer::TYPE_OPERA
+ auto source_path = source_profile.importer_type == user_data_importer::TYPE_OPERA
+ ? source_path_
+ : source_path_.DirName();
+#else
+ auto source_path = source_path_;
+#endif
+ const bool set_encryption_key = SetEncryptionKey(source_path);
+ if ((items & importer::PASSWORDS) && !cancelled() && set_encryption_key) {
+ bridge_->NotifyItemStarted(importer::PASSWORDS);
+ if ((items & user_data_importer::PASSWORDS) && !cancelled() && set_encryption_key) {
+ bridge_->NotifyItemStarted(user_data_importer::PASSWORDS);
+ ImportPasswords(base::FilePath(FILE_PATH_LITERAL("Login Data")));
+ ImportPasswords(
+ base::FilePath(FILE_PATH_LITERAL("Login Data For Account")));
+ bridge_->NotifyItemEnded(importer::PASSWORDS);
+ bridge_->NotifyItemEnded(user_data_importer::PASSWORDS);
+ }
+
+ bridge_->NotifyEnded();
@@ -2545,11 +2545,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ s.BindInt64(3, ui::PAGE_TRANSITION_MANUAL_SUBFRAME);
+ s.BindInt64(4, ui::PAGE_TRANSITION_KEYWORD_GENERATED);
+
+ std::vector<ImporterURLRow> rows;
+ std::vector<user_data_importer::ImporterURLRow> rows;
+ while (s.Step() && !cancelled()) {
+ GURL url(s.ColumnString(0));
+
+ ImporterURLRow row(url);
+ user_data_importer::ImporterURLRow row(url);
+ row.title = s.ColumnString16(1);
+ row.last_visit = base::Time::FromSecondsSinceUnixEpoch(
+ chromeTimeToDouble((s.ColumnInt64(2))));
@@ -2561,7 +2561,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
+
+ if (!rows.empty() && !cancelled())
+ bridge_->SetHistoryItems(rows, importer::VISIT_SOURCE_CHROME_IMPORTED);
+ bridge_->SetHistoryItems(rows, user_data_importer::VISIT_SOURCE_CHROME_IMPORTED);
+}
+
+void ChromeImporter::ImportBookmarks() {
@@ -2579,7 +2579,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ if (!bookmark_dict)
+ return;
+
+ std::vector<ImportedBookmarkEntry> bookmarks;
+ std::vector<user_data_importer::ImportedBookmarkEntry> bookmarks;
+ const base::Value::Dict* roots = bookmark_dict->FindDict("roots");
+ if (roots) {
+ // Importing bookmark bar items
@@ -2690,7 +2690,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ const base::Value::Dict* folder,
+ const std::vector<std::u16string>& parent_path,
+ bool is_in_toolbar,
+ std::vector<ImportedBookmarkEntry>* bookmarks) {
+ std::vector<user_data_importer::ImportedBookmarkEntry>* bookmarks) {
+ const base::Value::List* children = folder->FindList("children");
+ if (children) {
+ for (const auto& value : *children) {
@@ -2702,7 +2702,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ auto name = base::UTF8ToUTF16(name_found ? *name_found : std::string());
+ const auto* type = dict->FindString("type");
+ const auto* url = dict->FindString("url");
+ ImportedBookmarkEntry entry;
+ user_data_importer::ImportedBookmarkEntry entry;
+ if (type && *type == "folder") {
+ // Folders are added implicitly on adding children, so we only
+ // explicitly add empty folders.
@@ -2764,7 +2764,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ bool success = database.GetAutofillableLogins(&forms);
+ if (success) {
+ for (auto& entry : forms) {
+ importer::ImportedPasswordForm form;
+ user_data_importer::ImportedPasswordForm form;
+ if (PasswordFormToImportedPasswordForm(entry, form)) {
+ bridge_->SetPasswordForm(form);
+ }
@@ -2774,7 +2774,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ success = database.GetBlocklistLogins(&blocklist);
+ if (success) {
+ for (auto& entry : blocklist) {
+ importer::ImportedPasswordForm form;
+ user_data_importer::ImportedPasswordForm form;
+ if (PasswordFormToImportedPasswordForm(entry, form)) {
+ bridge_->SetPasswordForm(form);
+ }
@@ -2783,7 +2783,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+}
--- /dev/null
+++ b/chrome/utility/importer/chrome_importer.h
@@ -0,0 +1,75 @@
@@ -0,0 +1,77 @@
+/* Copyright (c) 2019 The Brave Authors. All rights reserved.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
@@ -2807,7 +2807,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "chrome/utility/importer/importer.h"
+#include "components/favicon_base/favicon_usage_data.h"
+
+namespace user_data_importer {
+struct ImportedBookmarkEntry;
+}
+
+namespace sql {
+class Database;
@@ -2820,7 +2822,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ChromeImporter& operator=(const ChromeImporter&) = delete;
+
+ // Importer:
+ void StartImport(const importer::SourceProfile& source_profile,
+ void StartImport(const user_data_importer::SourceProfile& source_profile,
+ uint16_t items,
+ ImporterBridge* bridge) override;
+
@@ -2853,7 +2855,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ const base::Value::Dict* folder,
+ const std::vector<std::u16string>& parent_path,
+ bool is_in_toolbar,
+ std::vector<ImportedBookmarkEntry>* bookmarks);
+ std::vector<user_data_importer::ImportedBookmarkEntry>* bookmarks);
+
+ std::u16string importer_name_;
+};
@@ -2861,7 +2863,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+#endif // BRAVE_UTILITY_IMPORTER_CHROME_IMPORTER_H_
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -10879,6 +10879,9 @@ Check your passwords anytime in <ph name
@@ -10913,6 +10913,9 @@ Check your passwords anytime in <ph name
Microsoft Edge
</message>
</if>
+74 -76
View File
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace {
#if BUILDFLAG(IS_WIN)
@@ -164,20 +166,30 @@ std::vector<importer::SourceProfile> Det
@@ -171,20 +173,30 @@ std::vector<user_data_importer::SourcePr
if (shell_integration::IsFirefoxDefaultBrowser()) {
DetectFirefoxProfiles(locale, &profiles);
DetectBuiltinWindowsProfiles(&profiles);
@@ -65,15 +65,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ }
#endif
if (include_interactive_profiles) {
importer::SourceProfile bookmarks_profile;
@@ -227,5 +239,11 @@ void ImporterList::SourceProfilesLoaded(
user_data_importer::SourceProfile bookmarks_profile;
@@ -234,5 +246,11 @@ void ImporterList::SourceProfilesLoaded(
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
source_profiles_.assign(profiles.begin(), profiles.end());
+
+ for (auto& profile : source_profiles_) {
+ if (profile.services_supported & importer::PASSWORDS)
+ profile.services_supported ^= importer::PASSWORDS;
+ if (profile.services_supported & user_data_importer::PASSWORDS)
+ profile.services_supported ^= user_data_importer::PASSWORDS;
+ }
+
std::move(profiles_loaded_callback).Run();
@@ -97,19 +97,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
public_deps = [
"//mojo/public/mojom/base",
@@ -81,6 +85,9 @@ source_set("importer") {
@@ -82,19 +86,28 @@ source_set("importer") {
sources = [
"firefox_importer_utils.cc",
"firefox_importer_utils.h",
+ "chrome_importer_constants.h",
+ "chrome_importer_utils.cc",
+ "chrome_importer_utils.h",
"imported_bookmark_entry.cc",
"imported_bookmark_entry.h",
"importer_autofill_form_data_entry.cc",
@@ -93,14 +100,20 @@ source_set("importer") {
"importer_url_row.cc",
"importer_url_row.h",
"importer_autofill_form_data_entry.h",
"importer_bridge.cc",
"importer_bridge.h",
"pstore_declarations.h",
+ "scoped_copy_file.cc",
+ "scoped_copy_file.h",
@@ -130,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
]
} else if (is_win) {
sources += [
@@ -111,6 +124,7 @@ source_set("importer") {
@@ -105,6 +118,7 @@ source_set("importer") {
"ie_importer_utils_win.h",
"importer_test_registry_overrider_win.cc",
"importer_test_registry_overrider_win.h",
@@ -138,10 +136,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
]
}
deps = [
@@ -118,8 +132,17 @@ source_set("importer") {
"//chrome/app:generated_resources",
@@ -113,8 +127,17 @@ source_set("importer") {
"//chrome/common:ini_parser",
"//components/favicon_base",
"//components/user_data_importer/common",
+ "//components/webdata/common",
"//content/public/common",
+ "//extensions/buildflags",
@@ -156,8 +154,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ]
+ }
}
--- a/chrome/common/importer/importer_type.h
+++ b/chrome/common/importer/importer_type.h
--- a/components/user_data_importer/common/importer_type.h
+++ b/components/user_data_importer/common/importer_type.h
@@ -28,6 +28,14 @@ enum ImporterType {
#if BUILDFLAG(IS_WIN)
TYPE_EDGE = 6,
@@ -172,7 +170,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ TYPE_BRAVE = 71,
};
} // namespace importer
} // namespace user_data_importer
--- a/tools/metrics/histograms/metadata/sql/histograms.xml
+++ b/tools/metrics/histograms/metadata/sql/histograms.xml
@@ -39,6 +39,7 @@ chromium-metrics-reviews@google.com.
@@ -183,15 +181,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<variant name="FileIndexService" summary="FileIndexService"/>
<variant name="FirefoxImporter" summary="FirefoxImporter"/>
<variant name="FirstPartySets" summary="FirstPartySets"/>
--- a/chrome/common/importer/importer_data_types.h
+++ b/chrome/common/importer/importer_data_types.h
--- a/components/user_data_importer/common/importer_data_types.h
+++ b/components/user_data_importer/common/importer_data_types.h
@@ -29,7 +29,8 @@ enum ImportItem {
SEARCH_ENGINES = 1 << 4,
HOME_PAGE = 1 << 5,
SEARCH_ENGINES = 1 << 4,
HOME_PAGE = 1 << 5,
AUTOFILL_FORM_DATA = 1 << 6,
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
+ EXTENSIONS = 1 << 7,
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
+ EXTENSIONS = 1 << 7,
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
};
// Information about a profile needed by an importer to do import work.
@@ -202,60 +200,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ VISIT_SOURCE_CHROME_IMPORTED = 4,
};
} // namespace importer
} // namespace user_data_importer
--- a/chrome/common/importer/profile_import_process_param_traits_macros.h
+++ b/chrome/common/importer/profile_import_process_param_traits_macros.h
@@ -20,11 +20,11 @@
#if BUILDFLAG(IS_WIN)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
importer::TYPE_UNKNOWN,
- importer::TYPE_EDGE)
+ importer::TYPE_BRAVE)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
user_data_importer::TYPE_UNKNOWN,
- user_data_importer::TYPE_EDGE)
+ user_data_importer::TYPE_BRAVE)
#else
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
importer::TYPE_UNKNOWN,
- importer::TYPE_BOOKMARKS_FILE)
+ importer::TYPE_BRAVE)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
user_data_importer::TYPE_UNKNOWN,
- user_data_importer::TYPE_BOOKMARKS_FILE)
+ user_data_importer::TYPE_BRAVE)
#endif
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImportItem,
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImportItem,
--- a/chrome/browser/ui/webui/settings/import_data_handler.cc
+++ b/chrome/browser/ui/webui/settings/import_data_handler.cc
@@ -146,6 +146,9 @@ void ImportDataHandler::HandleImportData
if (*type_dict.FindBool(prefs::kImportDialogSearchEngine)) {
selected_items |= importer::SEARCH_ENGINES;
selected_items |= user_data_importer::SEARCH_ENGINES;
}
+ if (*type_dict.FindBool(prefs::kImportDialogExtensions)) {
+ selected_items |= importer::EXTENSIONS;
+ selected_items |= user_data_importer::EXTENSIONS;
+ }
const importer::SourceProfile& source_profile =
const user_data_importer::SourceProfile& source_profile =
importer_list_->GetSourceProfileAt(browser_index);
@@ -223,6 +226,8 @@ void ImportDataHandler::SendBrowserProfi
(browser_services & importer::SEARCH_ENGINES) != 0);
browser_profile.Set("autofillFormData",
(browser_services & importer::AUTOFILL_FORM_DATA) != 0);
@@ -225,6 +228,8 @@ void ImportDataHandler::SendBrowserProfi
browser_profile.Set(
"autofillFormData",
(browser_services & user_data_importer::AUTOFILL_FORM_DATA) != 0);
+ browser_profile.Set("extensions",
+ (browser_services & importer::EXTENSIONS) != 0);
+ (browser_services & user_data_importer::EXTENSIONS) != 0);
browser_profiles.Append(std::move(browser_profile));
}
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -4271,6 +4271,10 @@ inline constexpr char kServiceWorkerToCo
// is set as a SharedWorker script URL.
@@ -4270,6 +4270,9 @@ inline constexpr char kServiceWorkerToCo
inline constexpr char kSharedWorkerBlobURLFixEnabled[] =
"worker.shared_worker_blob_url_fix_enabled";
+
+inline constexpr char kImportDialogExtensions[] =
+ "import_dialog_extensions";
+
} // namespace prefs
#endif // CHROME_COMMON_PREF_NAMES_H_
// Boolean indicating whether clearing window.name when the navigation is
// top-level, cross-site and swaps BrowsingContextGroup is allowed or not.
inline constexpr char kClearWindowNameForNewBrowsingContextGroup[] =
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -1150,6 +1150,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
@@ -1148,6 +1148,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
settings_api::PrefType::kBoolean;
(*s_allowlist)[::prefs::kImportDialogSearchEngine] =
settings_api::PrefType::kBoolean;
@@ -274,7 +271,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h"
#include "chrome/browser/ui/webui/settings/on_startup_handler.h"
#include "chrome/browser/ui/webui/settings/password_manager_handler.h"
@@ -213,6 +214,7 @@ void SettingsUI::RegisterProfilePrefs(
@@ -208,6 +209,7 @@ void SettingsUI::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
registry->RegisterBooleanPref(prefs::kImportDialogSearchEngine, true);
@@ -282,7 +279,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
SettingsUI::SettingsUI(content::WebUI* web_ui)
@@ -259,7 +261,7 @@ SettingsUI::SettingsUI(content::WebUI* w
@@ -237,7 +239,7 @@ SettingsUI::SettingsUI(content::WebUI* w
AddSettingsPageUIHandler(std::make_unique<DownloadsHandler>(profile));
AddSettingsPageUIHandler(std::make_unique<ExtensionControlHandler>());
AddSettingsPageUIHandler(std::make_unique<FontHandler>(profile));
@@ -293,7 +290,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#if BUILDFLAG(IS_WIN)
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -880,6 +880,8 @@ void AddImportDataStrings(content::WebUI
@@ -862,6 +862,8 @@ void AddImportDataStrings(content::WebUI
{"importHistory", IDS_SETTINGS_IMPORT_HISTORY_CHECKBOX},
{"importFavorites", IDS_SETTINGS_IMPORT_FAVORITES_CHECKBOX},
{"importPasswords", IDS_SETTINGS_IMPORT_PASSWORDS_CHECKBOX},
@@ -318,7 +315,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1528,6 +1528,10 @@ static_library("ui") {
@@ -1456,6 +1456,10 @@ static_library("ui") {
"webui/settings/accessibility_main_handler.h",
"webui/settings/appearance_handler.cc",
"webui/settings/appearance_handler.h",
@@ -329,7 +326,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"webui/settings/browser_lifetime_handler.cc",
"webui/settings/browser_lifetime_handler.h",
"webui/settings/captions_handler.cc",
@@ -1683,6 +1687,13 @@ static_library("ui") {
@@ -1611,6 +1615,13 @@ static_library("ui") {
]
}
@@ -345,14 +342,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"//base",
--- a/chrome/browser/ui/webui/settings/import_data_handler.h
+++ b/chrome/browser/ui/webui/settings/import_data_handler.h
@@ -38,7 +38,9 @@ class ImportDataHandler : public Setting
@@ -36,9 +36,9 @@ class ImportDataHandler : public Setting
void RegisterMessages() override;
void OnJavascriptAllowed() override {}
void OnJavascriptDisallowed() override;
private:
- void StartImport(const importer::SourceProfile& source_profile,
-
+ friend class BraveImportDataHandler;
+ private:
+ virtual void StartImport(const importer::SourceProfile& source_profile,
private:
- void StartImport(const user_data_importer::SourceProfile& source_profile,
+ virtual void StartImport(const user_data_importer::SourceProfile& source_profile,
uint16_t imported_items);
// Handler for the "importData" message. First argument is the selected
@@ -369,7 +367,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"external_process_importer_client.h",
"external_process_importer_host.h",
"firefox_profile_lock.h",
@@ -36,6 +40,10 @@ source_set("impl") {
@@ -37,6 +41,10 @@ source_set("impl") {
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
sources = [
@@ -382,10 +380,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"firefox_profile_lock.cc",
--- a/chrome/browser/importer/external_process_importer_host.h
+++ b/chrome/browser/importer/external_process_importer_host.h
@@ -78,8 +78,9 @@ class ExternalProcessImporterHost
@@ -79,8 +79,9 @@ class ExternalProcessImporterHost
void NotifyImportStarted();
void NotifyImportItemStarted(importer::ImportItem item);
void NotifyImportItemEnded(importer::ImportItem item);
void NotifyImportItemStarted(user_data_importer::ImportItem item);
void NotifyImportItemEnded(user_data_importer::ImportItem item);
- void NotifyImportEnded();
+ void virtual NotifyImportEnded();
@@ -395,7 +393,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
~ExternalProcessImporterHost() override;
--- a/components/history/core/browser/history_types.h
+++ b/components/history/core/browser/history_types.h
@@ -54,6 +54,8 @@ enum VisitSource {
@@ -53,6 +53,8 @@ enum VisitSource {
SOURCE_FIREFOX_IMPORTED = 3,
SOURCE_IE_IMPORTED = 4,
SOURCE_SAFARI_IMPORTED = 5,
@@ -406,7 +404,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Corresponds to the "id" column of the "visits" SQL table.
--- a/components/history/core/browser/visit_database.cc
+++ b/components/history/core/browser/visit_database.cc
@@ -118,6 +118,8 @@ VisitSource VisitSourceFromInt(int value
@@ -117,6 +117,8 @@ VisitSource VisitSourceFromInt(int value
case SOURCE_FIREFOX_IMPORTED:
case SOURCE_IE_IMPORTED:
case SOURCE_SAFARI_IMPORTED:
@@ -419,9 +417,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
@@ -53,6 +53,8 @@ history::VisitSource ConvertImporterVisi
return history::SOURCE_IE_IMPORTED;
case importer::VISIT_SOURCE_SAFARI_IMPORTED:
case user_data_importer::VISIT_SOURCE_SAFARI_IMPORTED:
return history::SOURCE_SAFARI_IMPORTED;
+ case importer::VISIT_SOURCE_CHROME_IMPORTED:
+ case user_data_importer::VISIT_SOURCE_CHROME_IMPORTED:
+ return history::SOURCE_CHROME_IMPORTED;
}
NOTREACHED();
@@ -477,7 +475,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
services.Add(RunPassageEmbeddingsService);
--- a/chrome/utility/importer/external_process_importer_bridge.h
+++ b/chrome/utility/importer/external_process_importer_bridge.h
@@ -69,7 +69,7 @@ class ExternalProcessImporterBridge : pu
@@ -72,7 +72,7 @@ class ExternalProcessImporterBridge : pu
std::u16string GetLocalizedString(int message_id) override;
// End ImporterBridge implementation.
@@ -513,7 +511,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
--- a/chrome/browser/importer/in_process_importer_bridge.h
+++ b/chrome/browser/importer/in_process_importer_bridge.h
@@ -57,7 +57,7 @@ class InProcessImporterBridge : public I
@@ -59,7 +59,7 @@ class InProcessImporterBridge : public I
std::u16string GetLocalizedString(int message_id) override;
// End ImporterBridge implementation.
@@ -527,13 +525,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -35,6 +35,7 @@ enum ImporterTypeMetrics {
void LogImporterUseToMetrics(const std::string& metric_postfix,
ImporterType type) {
user_data_importer::ImporterType type) {
+ return;
ImporterTypeMetrics metrics_type = IMPORTER_METRICS_UNKNOWN;
switch (type) {
case TYPE_UNKNOWN:
case user_data_importer::TYPE_UNKNOWN:
@@ -59,6 +60,9 @@ void LogImporterUseToMetrics(const std::
case TYPE_BOOKMARKS_FILE:
case user_data_importer::TYPE_BOOKMARKS_FILE:
metrics_type = IMPORTER_METRICS_BOOKMARKS_FILE;
break;
+ default:
@@ -544,7 +542,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Note: This leaks memory, which is the expected behavior as the factory
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -51,10 +51,10 @@ class ExternalProcessImporterClient
@@ -48,10 +48,10 @@ class ExternalProcessImporterClient
const ExternalProcessImporterClient&) = delete;
// Launches the task to start the external process.
@@ -557,7 +555,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// chrome::mojom::ProfileImportObserver:
void OnImportStart() override;
@@ -84,6 +84,8 @@ class ExternalProcessImporterClient
@@ -82,6 +82,8 @@ class ExternalProcessImporterClient
const std::vector<ImporterAutofillFormDataEntry>&
autofill_form_data_entry_group) override;
@@ -566,7 +564,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
protected:
~ExternalProcessImporterClient() override;
@@ -99,7 +101,7 @@ class ExternalProcessImporterClient
@@ -97,7 +99,7 @@ class ExternalProcessImporterClient
// The Mojo connections need to be torn down on the same thread that created
// them, but the destructor is not guaranteed to be run on that thread so we
// tear down the connections explicitly.
@@ -9,7 +9,7 @@
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2530,6 +2530,7 @@ static_library("browser") {
@@ -2564,6 +2564,7 @@ static_library("browser") {
"//third_party/libyuv",
"//third_party/metrics_proto",
"//third_party/re2",
@@ -62,7 +62,7 @@
#include "components/viz/common/switches.h"
#include "components/viz/host/gpu_client.h"
#include "components/viz/host/host_frame_sink_manager.h"
@@ -3491,6 +3492,8 @@ void RenderProcessHostImpl::PropagateBro
@@ -3507,6 +3508,8 @@ void RenderProcessHostImpl::PropagateBro
switches::kEnableWebGLImageChromium,
switches::kEnableWebGPUDeveloperFeatures,
switches::kFileUrlPathAlias,
@@ -91,7 +91,7 @@
#include "ui/accessibility/accessibility_features.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/blink/blink_features.h"
@@ -490,6 +491,10 @@ void SetRuntimeFeaturesFromCommandLine(c
@@ -487,6 +488,10 @@ void SetRuntimeFeaturesFromCommandLine(c
true},
{wrf::EnableWebAudioBypassOutputBufferingOptOut,
blink::switches::kWebAudioBypassOutputBufferingOptOut, true},
@@ -116,15 +116,15 @@
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -43,6 +43,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/not_fatal_until.h"
@@ -41,6 +41,7 @@
#include "base/i18n/time_formatting.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"
+#include "base/rand_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
@@ -889,6 +890,11 @@ Document::Document(const DocumentInit& i
#include "base/trace_event/trace_event.h"
@@ -890,6 +891,11 @@ Document::Document(const DocumentInit& i
TRACE_EVENT_WITH_FLOW0("blink", "Document::Document", TRACE_ID_LOCAL(this),
TRACE_EVENT_FLAG_FLOW_OUT);
DCHECK(agent_);
@@ -136,7 +136,7 @@
if (base::FeatureList::IsEnabled(features::kDelayAsyncScriptExecution) &&
features::kDelayAsyncScriptExecutionDelayByDefaultParam.Get()) {
script_runner_delayer_->Activate();
@@ -1015,6 +1021,14 @@ const Position Document::PositionAdjuste
@@ -1020,6 +1026,14 @@ const Position Document::PositionAdjuste
return Position::BeforeNode(*shadow_host);
}
@@ -153,7 +153,7 @@
selector_query_cache_ = MakeGarbageCollected<SelectorQueryCache>();
--- a/third_party/blink/renderer/core/dom/document.h
+++ b/third_party/blink/renderer/core/dom/document.h
@@ -556,6 +556,10 @@ class CORE_EXPORT Document : public Cont
@@ -558,6 +558,10 @@ class CORE_EXPORT Document : public Cont
has_xml_declaration_ = has_xml_declaration ? 1 : 0;
}
@@ -164,7 +164,7 @@
V8VisibilityState visibilityState() const;
String visibilityStateAsString() const;
bool IsPageVisible() const;
@@ -2732,6 +2736,9 @@ class CORE_EXPORT Document : public Cont
@@ -2747,6 +2751,9 @@ class CORE_EXPORT Document : public Cont
base::ElapsedTimer start_time_;
@@ -176,7 +176,7 @@
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -2878,6 +2878,11 @@ DOMRectList* Element::getClientRects() {
@@ -2959,6 +2959,11 @@ DOMRectList* Element::getClientRects() {
DCHECK(element_layout_object);
GetDocument().AdjustQuadsForScrollAndAbsoluteZoom(quads,
*element_layout_object);
@@ -188,7 +188,7 @@
return MakeGarbageCollected<DOMRectList>(quads);
}
@@ -2905,6 +2910,9 @@ gfx::RectF Element::GetBoundingClientRec
@@ -2986,6 +2991,9 @@ gfx::RectF Element::GetBoundingClientRec
DCHECK(element_layout_object);
GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
*element_layout_object);
@@ -276,7 +276,7 @@
namespace blink {
namespace {
@@ -1293,13 +1296,26 @@ TextMetrics* BaseRenderingContext2D::mea
@@ -1276,13 +1279,26 @@ TextMetrics* BaseRenderingContext2D::mea
TextDirection direction =
ToTextDirection(state.GetDirection(), host, computed_style);
@@ -308,7 +308,7 @@
String BaseRenderingContext2D::lang() const {
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1797,6 +1797,7 @@ component("platform") {
@@ -1793,6 +1793,7 @@ component("platform") {
"//components/paint_preview/common",
"//components/search_engines:search_engine_utils",
"//components/translate/core/language_detection:language_detection",
@@ -343,7 +343,7 @@
#include "third_party/skia/include/core/SkSurface.h"
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2176,6 +2176,12 @@
@@ -2254,6 +2254,12 @@
status: "stable",
},
{
@@ -34,7 +34,7 @@ approach to change color components.
#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3494,6 +3494,7 @@ void RenderProcessHostImpl::PropagateBro
@@ -3510,6 +3510,7 @@ void RenderProcessHostImpl::PropagateBro
switches::kFileUrlPathAlias,
switches::kFingerprintingClientRectsNoise,
switches::kFingerprintingCanvasMeasureTextNoise,
@@ -44,7 +44,7 @@ approach to change color components.
switches::kForceGpuMemAvailableMb,
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -495,6 +495,8 @@ void SetRuntimeFeaturesFromCommandLine(c
@@ -492,6 +492,8 @@ void SetRuntimeFeaturesFromCommandLine(c
switches::kFingerprintingClientRectsNoise, true},
{wrf::EnableFingerprintingCanvasMeasureTextNoise,
switches::kFingerprintingCanvasMeasureTextNoise, true},
@@ -65,7 +65,7 @@ approach to change color components.
};
--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -615,6 +615,9 @@ ImageData* BaseRenderingContext2D::getIm
@@ -599,6 +599,9 @@ ImageData* BaseRenderingContext2D::getIm
snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
}
@@ -77,7 +77,7 @@ approach to change color components.
return image_data;
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1741,7 +1741,9 @@ component("platform") {
@@ -1737,7 +1737,9 @@ component("platform") {
"//third_party/blink/renderer:non_test_config",
]
@@ -99,19 +99,6 @@ approach to change color components.
+}
+
} // namespace blink
--- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
+++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
@@ -130,6 +130,10 @@ base::span<const uint8_t> ImageDataBuffe
bool ImageDataBuffer::EncodeImage(const ImageEncodingMimeType mime_type,
const double& quality,
Vector<unsigned char>* encoded_image) const {
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
+ // shuffle subchannel color data within the pixmap
+ StaticBitmapImage::ShuffleSubchannelColorData(pixmap_.writable_addr(), pixmap_.info(), 0, 0);
+ }
return ImageEncoder::Encode(encoded_image, pixmap_, mime_type, quality);
}
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
@@ -4,6 +4,8 @@
@@ -303,9 +290,31 @@ approach to change color components.
bool IsStaticBitmapImage() const override { return true; }
// Methods overridden by all sub-classes
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
@@ -14,6 +14,8 @@
#include <stdio.h> // Needed by jpeglib.h
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/libwebp/src/src/webp/encode.h" // for WEBP_MAX_DIMENSION
namespace blink {
@@ -43,6 +45,10 @@ bool ImageEncoder::Encode(Vector<unsigne
const SkPixmap& src,
ImageEncodingMimeType mime_type,
double quality) {
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
+ // shuffle subchannel color data within the pixmap
+ StaticBitmapImage::ShuffleSubchannelColorData(src.writable_addr(), src.info(), 0, 0);
+ }
switch (mime_type) {
case kMimeTypeJpeg: {
SkJpegEncoder::Options options;
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2182,6 +2182,9 @@
@@ -2260,6 +2260,9 @@
name: "FingerprintingCanvasMeasureTextNoise",
},
{
@@ -17,7 +17,7 @@ with limited CPU/memory resources and it is disabled by default.
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2207,6 +2207,7 @@ static_library("browser") {
@@ -2241,6 +2241,7 @@ static_library("browser") {
"//components/net_log",
"//components/network_hints/common:mojo_bindings",
"//components/network_session_configurator/browser",
@@ -81,7 +81,7 @@ with limited CPU/memory resources and it is disabled by default.
#include "ppapi/buildflags/buildflags.h"
#include "printing/buildflags/buildflags.h"
#include "services/network/public/cpp/features.h"
@@ -418,6 +422,18 @@ void BrowserProcessImpl::Init() {
@@ -419,6 +423,18 @@ void BrowserProcessImpl::Init() {
pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
base::BindRepeating(&ApplyMetricsReportingPolicy));
@@ -102,7 +102,7 @@ with limited CPU/memory resources and it is disabled by default.
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2603,6 +2603,10 @@ const char kMantisFeatureKeyDescription[
@@ -2632,6 +2632,10 @@ const char kMantisFeatureKeyDescription[
"Feature key to use the Mantis feature on ChromeOS.";
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -115,7 +115,7 @@ with limited CPU/memory resources and it is disabled by default.
const char kMediaRouterCastAllowAllIPsDescription[] =
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1506,6 +1506,9 @@ extern const char kMantisFeatureKeyName[
@@ -1528,6 +1528,9 @@ extern const char kMantisFeatureKeyName[
extern const char kMantisFeatureKeyDescription[];
#endif // IS_CHROMEOS
@@ -3,14 +3,14 @@ author: Michael Gilbert <mgilbert@debian.org>
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -163,10 +163,6 @@ void AddInfoBarsIfNecessary(Browser* bro
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
@@ -171,10 +171,6 @@ void AddInfoBarsIfNecessary(Browser* bro
infobars::ContentInfoBarManager* infobar_manager =
infobars::ContentInfoBarManager::FromWebContents(web_contents);
- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
- if (!google_apis::HasAPIKeyConfigured()) {
- GoogleApiKeysInfoBarDelegate::Create(infobar_manager);
- }
-
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state ||
@@ -12,7 +12,7 @@
void BackgroundModeManager::RegisterProfile(Profile* profile) {
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1567,7 +1567,7 @@ void ChromeContentBrowserClient::Registe
@@ -1407,7 +1407,7 @@ void ChromeContentBrowserClient::Registe
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -56,7 +56,7 @@
</cr-dialog>
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -97,7 +97,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -113,7 +113,7 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
registry->RegisterBooleanPref(
@@ -87,7 +87,7 @@
kAutofillPaymentCvcStorage, true,
--- a/components/bookmarks/browser/bookmark_utils.cc
+++ b/components/bookmarks/browser/bookmark_utils.cc
@@ -457,7 +457,7 @@ bool DoesBookmarkContainWords(const std:
@@ -449,7 +449,7 @@ bool DoesBookmarkContainWords(const std:
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
@@ -5,7 +5,7 @@ Subject: [PATCH 56/66] browser: disable profile auto-import on first run
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1583,11 +1583,6 @@ int ChromeBrowserMainParts::PreMainMessa
@@ -1568,11 +1568,6 @@ int ChromeBrowserMainParts::PreMainMessa
// and preferences have been registered since some of the import code depends
// on preferences.
if (first_run::IsChromeFirstRun()) {
@@ -1,27 +1,16 @@
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
+#include "base/command_line.h"
#include "base/observer_list.h"
#include "build/build_config.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -86,9 +87,12 @@ bool BookmarkTabHelper::ShouldShowBookma
const bool has_saved_tab_groups =
tab_group_service && !tab_group_service->GetAllGroups().empty();
+ const std::string flag_value =
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp");
// The bookmark bar is only shown on the NTP if the user
// has added something to it.
- return IsNTP(web_contents()) && (has_bookmarks || has_saved_tab_groups);
+ return IsNTP(web_contents()) && (has_bookmarks || has_saved_tab_groups) &&
+ (flag_value != "never");
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3824,6 +3824,10 @@ void Browser::UpdateBookmarkBarState(Boo
}
void BookmarkTabHelper::AddObserver(BookmarkTabHelperObserver* observer) {
bool Browser::ShouldShowBookmarkBar() const {
+ if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp") == "never") {
+ return false;
+ }
+
if (profile_->IsGuestSession()) {
return false;
}
--- a/chrome/browser/ungoogled_flag_choices.h
+++ b/chrome/browser/ungoogled_flag_choices.h
@@ -34,4 +34,10 @@ const FeatureEntry::Choice kScrollEventC
@@ -8,7 +8,7 @@
#include "chrome/browser/ui/views/status_bubble_views.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
#include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
@@ -587,6 +588,7 @@ Browser::Browser(const CreateParams& par
@@ -640,6 +641,7 @@ Browser::Browser(const CreateParams& par
omit_from_session_restore_(params.omit_from_session_restore),
should_trigger_session_restore_(params.should_trigger_session_restore),
cancel_download_confirmation_state_(NOT_PROMPTED),
@@ -16,7 +16,7 @@
override_bounds_(params.initial_bounds),
initial_show_state_(params.initial_show_state),
initial_workspace_(params.initial_workspace),
@@ -1050,20 +1052,22 @@ Browser::WarnBeforeClosingResult Browser
@@ -1102,20 +1104,22 @@ Browser::WarnBeforeClosingResult Browser
return WarnBeforeClosingResult::kOkToClose;
}
@@ -52,7 +52,7 @@
}
DCHECK(!warn_before_closing_callback_)
@@ -1101,6 +1105,7 @@ bool Browser::TryToCloseWindow(
@@ -1153,6 +1157,7 @@ bool Browser::TryToCloseWindow(
void Browser::ResetTryToCloseWindow() {
cancel_download_confirmation_state_ = NOT_PROMPTED;
@@ -60,7 +60,7 @@
unload_controller_.ResetTryToCloseWindow();
}
@@ -3447,6 +3452,58 @@ bool Browser::CanCloseWithInProgressDown
@@ -3542,6 +3547,58 @@ bool Browser::CanCloseWithInProgressDown
return false;
}
@@ -119,7 +119,7 @@
void Browser::InProgressDownloadResponse(bool cancel_downloads) {
if (cancel_downloads) {
cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
@@ -3472,6 +3529,22 @@ void Browser::InProgressDownloadResponse
@@ -3567,6 +3624,22 @@ void Browser::InProgressDownloadResponse
std::move(warn_before_closing_callback_)
.Run(WarnBeforeClosingResult::kDoNotClose);
@@ -170,7 +170,7 @@
// Called when the user has decided whether to proceed or not with the browser
// closure, in case the cookie migration notice was shown. |proceed_closing|
// is true if the browser can be closed.
@@ -1415,6 +1421,8 @@ class Browser : public TabStripModelObse
@@ -1413,6 +1419,8 @@ class Browser : public TabStripModelObse
// when the browser is closed with in-progress downloads.
CancelDownloadConfirmationState cancel_download_confirmation_state_;
@@ -1,20 +1,21 @@
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -943,10 +943,14 @@ bool HandleNewTabPageLocationOverride(
@@ -821,11 +821,15 @@ bool HandleNewTabPageLocationOverride(
// Don't change the URL when incognito mode.
if (profile->IsOffTheRecord())
if (profile->IsOffTheRecord()) {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("custom-ntp"))
return false;
}
std::string ntp_location =
profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride);
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("custom-ntp"))
+ ntp_location = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("custom-ntp");
+ if (profile->IsOffTheRecord() && ntp_location.find("chrome://") != std::string::npos) return false;
if (ntp_location.empty())
if (ntp_location.empty()) {
return false;
url::Component scheme;
}
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -76,4 +76,8 @@
@@ -28,7 +29,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/components/webui/flags/flags_state.cc
+++ b/components/webui/flags/flags_state.cc
@@ -234,6 +234,7 @@ std::string GetCombinedOriginListValue(c
@@ -233,6 +233,7 @@ std::string GetCombinedOriginListValue(c
command_line.GetSwitchValueASCII(command_line_switch);
const std::string new_value =
flags_storage.GetOriginListFlag(internal_entry_name);
@@ -36,7 +37,7 @@
return CombineAndSanitizeOriginLists(existing_value, new_value);
}
@@ -484,6 +485,7 @@ void FlagsState::SetOriginListFlag(const
@@ -483,6 +484,7 @@ void FlagsState::SetOriginListFlag(const
const std::string& value,
FlagsStorage* flags_storage) {
const std::string new_value =
@@ -11,7 +11,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -18,6 +18,8 @@
@@ -19,6 +19,8 @@
namespace blink::features {
@@ -40,8 +40,8 @@
+#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/input/web_menu_source_type.h"
#include "third_party/blink/public/platform/web_input_event_result.h"
#include "third_party/blink/renderer/core/dom/document.h"
@@ -1434,10 +1435,14 @@ FrameSelection& SelectionController::Sel
#include "third_party/blink/renderer/core/annotation/annotation_agent_impl.h"
@@ -1436,10 +1437,14 @@ FrameSelection& SelectionController::Sel
}
bool IsSelectionOverLink(const MouseEventWithHitTestResults& event) {
@@ -10,7 +10,7 @@
}
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -57,6 +57,7 @@
@@ -59,6 +59,7 @@
#include "ui/base/webui/jstemplate_builder.h"
#include "ui/base/webui/web_ui_util.h"
#include "ui/color/color_provider.h"
@@ -18,7 +18,7 @@
#include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h"
@@ -454,7 +455,9 @@ void NTPResourceCache::CreateNewTabIncog
@@ -467,7 +468,9 @@ void NTPResourceCache::CreateNewTabIncog
profile_->GetPrefs()->GetString(prefs::kCurrentThemeID);
// Colors.
@@ -41,7 +41,7 @@
#include "base/feature_list.h"
#include "base/format_macros.h"
#include "base/functional/bind.h"
@@ -546,6 +547,15 @@ AutocompleteController::AutocompleteCont
@@ -566,6 +567,15 @@ AutocompleteController::AutocompleteCont
steady_state_omnibox_position_(
metrics::OmniboxEventProto::UNKNOWN_POSITION) {
provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
@@ -59,7 +59,7 @@
// so their async requests can be kicked off before waiting a few milliseconds
--- a/components/omnibox/browser/history_url_provider.cc
+++ b/components/omnibox/browser/history_url_provider.cc
@@ -489,6 +489,9 @@ void HistoryURLProvider::Start(const Aut
@@ -488,6 +488,9 @@ void HistoryURLProvider::Start(const Aut
if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
matches_.push_back(what_you_typed_match);
@@ -79,7 +79,7 @@
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
@@ -629,6 +630,9 @@ void SearchProvider::Run(bool query_is_p
@@ -628,6 +629,9 @@ void SearchProvider::Run(bool query_is_p
}
void SearchProvider::DoHistoryQuery(bool minimal_changes) {
@@ -2,7 +2,7 @@
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
@@ -541,7 +541,9 @@ void TabHelpers::AttachTabHelpers(WebCon
@@ -545,7 +545,9 @@ void TabHelpers::AttachTabHelpers(WebCon
profile, web_contents);
#endif // BUILDFLAG(SAFE_BROWSING_AVAILABLE)
SafetyTipWebContentsObserver::CreateForWebContents(web_contents);
@@ -25,7 +25,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/chrome/renderer/chrome_render_frame_observer.cc
+++ b/chrome/renderer/chrome_render_frame_observer.cc
@@ -256,14 +256,16 @@ void ChromeRenderFrameObserver::DidFinis
@@ -253,14 +253,16 @@ void ChromeRenderFrameObserver::DidFinis
if (frame->Parent() || frame->IsInFencedFrameTree())
return;
@@ -52,7 +52,7 @@
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -20,6 +20,7 @@
@@ -15,6 +15,7 @@
#include "base/base64url.h"
#include "base/check_deref.h"
#include "base/check_is_test.h"
@@ -60,8 +60,8 @@
#include "base/containers/contains.h"
#include "base/containers/fixed_flat_map.h"
#include "base/containers/flat_map.h"
@@ -309,6 +310,12 @@ std::string_view SyncChangeTypeToHistogr
NOTREACHED();
@@ -346,6 +347,12 @@ bool ShouldCommitUpdateToAccount(
return account_data_changed;
}
+bool ShouldAutocollect() {
@@ -73,7 +73,7 @@
} // namespace
// TemplateURLService::LessWithPrefix -----------------------------------------
@@ -489,6 +496,7 @@ TemplateURLService::TemplateURLService(
@@ -526,6 +533,7 @@ TemplateURLService::TemplateURLService(
std::unique_ptr<TemplateURLServiceClient> client,
const base::RepeatingClosure& dsp_change_callback)
: prefs_(prefs),
@@ -81,7 +81,7 @@
search_engine_choice_service_(search_engine_choice_service),
prepopulate_data_resolver_(prepopulate_data_resolver),
search_terms_data_(std::move(search_terms_data)),
@@ -594,8 +602,8 @@ bool TemplateURLService::CanAddAutogener
@@ -631,8 +639,8 @@ bool TemplateURLService::CanAddAutogener
// that may interfere with search queries). An easy heuristic for this is
// whether the user has a TemplateURL that has been manually modified (e.g.,
// renamed) connected to the same host.
@@ -92,7 +92,7 @@
}
bool TemplateURLService::IsPrepopulatedOrDefaultProviderByPolicy(
@@ -2438,6 +2446,8 @@ SyncDataMap TemplateURLService::CreateGU
@@ -2441,6 +2449,8 @@ SyncDataMap TemplateURLService::CreateGU
}
void TemplateURLService::Init() {
@@ -101,7 +101,7 @@
if (client_) {
client_->SetOwner(this);
}
@@ -2620,6 +2630,9 @@ void TemplateURLService::ChangeToLoadedS
@@ -2623,6 +2633,9 @@ void TemplateURLService::ChangeToLoadedS
bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
const std::string& host) const {
@@ -113,7 +113,7 @@
return true;
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -901,6 +901,8 @@ class TemplateURLService final : public
@@ -911,6 +911,8 @@ class TemplateURLService final : public
raw_ref<TemplateURLPrepopulateData::Resolver> prepopulate_data_resolver_;
@@ -24,7 +24,7 @@
// BrowserView::GetAccessibleTabLabel to get the updated accessible name.
--- a/chrome/browser/ui/views/tabs/tab.h
+++ b/chrome/browser/ui/views/tabs/tab.h
@@ -89,6 +89,7 @@ class Tab : public gfx::AnimationDelegat
@@ -93,6 +93,7 @@ class Tab : public gfx::AnimationDelegat
void OnMouseEntered(const ui::MouseEvent& event) override;
void OnMouseExited(const ui::MouseEvent& event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
@@ -42,7 +42,7 @@
#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/containers/adapters.h"
@@ -1946,6 +1947,8 @@ void TabStrip::OnMouseEventInTab(views::
@@ -1936,6 +1937,8 @@ void TabStrip::OnMouseEventInTab(views::
}
void TabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1535,7 +1535,8 @@ void BrowserCommandController::InitComma
@@ -1555,7 +1555,8 @@ void BrowserCommandController::InitComma
command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
normal_window);
@@ -10,9 +10,22 @@
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
enable_tab_search_commands);
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
--- a/chrome/browser/ui/ui_features.cc
+++ b/chrome/browser/ui/ui_features.cc
@@ -458,6 +458,10 @@ static std::string GetCountryCode() {
}
bool IsTabSearchMoving() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button")) {
+ return false;
+ }
+
static const bool is_tab_search_moving = [] {
if (GetCountryCode() == "us" &&
base::FeatureList::IsEnabled(
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -5197,6 +5197,7 @@ void BrowserView::AddedToWidget() {
@@ -5283,6 +5283,7 @@ void BrowserView::AddedToWidget() {
toolbar_->Init();
@@ -49,15 +62,3 @@
+ "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag",
+ kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -538,7 +538,8 @@ BASE_FEATURE(kTabstripComboButton,
base::FEATURE_DISABLED_BY_DEFAULT);
bool IsTabSearchMoving() {
- return base::FeatureList::IsEnabled(features::kTabstripComboButton);
+ return base::FeatureList::IsEnabled(features::kTabstripComboButton) &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("remove-tabsearch-button");
}
const base::FeatureParam<bool> kTabstripComboButtonHasBackground{
@@ -11,7 +11,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/components/webui/flags/flags_state.cc
+++ b/components/webui/flags/flags_state.cc
@@ -235,6 +235,7 @@ std::string GetCombinedOriginListValue(c
@@ -234,6 +234,7 @@ std::string GetCombinedOriginListValue(c
const std::string new_value =
flags_storage.GetOriginListFlag(internal_entry_name);
if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value;
@@ -19,7 +19,7 @@
return CombineAndSanitizeOriginLists(existing_value, new_value);
}
@@ -486,6 +487,7 @@ void FlagsState::SetOriginListFlag(const
@@ -485,6 +486,7 @@ void FlagsState::SetOriginListFlag(const
FlagsStorage* flags_storage) {
const std::string new_value =
internal_name == "custom-ntp" ? value :
@@ -1,6 +1,6 @@
--- a/chrome/browser/browser_features.cc
+++ b/chrome/browser/browser_features.cc
@@ -349,4 +349,5 @@ BASE_FEATURE(kRemovalOfIWAsFromTabCaptur
@@ -359,4 +359,5 @@ BASE_FEATURE(kRemovalOfIWAsFromTabCaptur
"RemovalOfIWAsFromTabCapture",
base::FEATURE_ENABLED_BY_DEFAULT);
@@ -8,7 +8,7 @@
} // namespace features
--- a/chrome/browser/browser_features.h
+++ b/chrome/browser/browser_features.h
@@ -133,6 +133,7 @@ BASE_DECLARE_FEATURE(kRemovalOfIWAsFromT
@@ -135,6 +135,7 @@ BASE_DECLARE_FEATURE(kRemovalOfIWAsFromT
// module, e.g.
// //chrome/browser/<foo_module>/features.h
//
@@ -8,7 +8,7 @@
#include "base/containers/adapters.h"
#include "base/containers/flat_map.h"
#include "base/containers/span.h"
@@ -998,6 +999,10 @@ void TabStripModel::CloseAllTabsInGroup(
@@ -1161,6 +1162,10 @@ void TabStripModel::CloseAllTabsInGroup(
void TabStripModel::CloseWebContentsAt(int index, uint32_t close_types) {
CHECK(ContainsIndex(index));
@@ -19,7 +19,7 @@
CloseTabs({GetWebContentsAt(index)}, close_types);
}
@@ -2466,9 +2471,13 @@ TabStripModel::GetGroupsDestroyedFromRem
@@ -2789,9 +2794,13 @@ TabStripModel::GetGroupsDestroyedFromRem
void TabStripModel::ExecuteCloseTabsByIndices(
base::RepeatingCallback<std::vector<int>()> get_indices_to_close,
uint32_t close_types) {
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
@@ -112,6 +113,14 @@ scoped_refptr<extensions::CrxInstaller>
@@ -113,6 +114,14 @@ scoped_refptr<extensions::CrxInstaller>
return installer;
}
@@ -26,7 +26,7 @@
bool IsExtensionDownload(const DownloadItem& download_item) {
if (download_item.GetTargetDisposition() ==
DownloadItem::TARGET_DISPOSITION_PROMPT)
@@ -120,7 +129,7 @@ bool IsExtensionDownload(const DownloadI
@@ -121,7 +130,7 @@ bool IsExtensionDownload(const DownloadI
if (download_item.GetMimeType() == extensions::Extension::kMimeType ||
extensions::UserScript::IsURLUserScript(download_item.GetURL(),
download_item.GetMimeType())) {
@@ -13,7 +13,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1207,6 +1207,8 @@ WindowOpenDisposition NavigationPolicyTo
@@ -1208,6 +1208,8 @@ WindowOpenDisposition NavigationPolicyTo
case blink::kWebNavigationPolicyNewWindow:
return WindowOpenDisposition::NEW_WINDOW;
case blink::kWebNavigationPolicyNewPopup:
@@ -21,7 +21,7 @@
#include "base/compiler_specific.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
@@ -1338,7 +1339,8 @@ void HistoryBackend::InitImpl(
@@ -1327,7 +1328,8 @@ void HistoryBackend::InitImpl(
db_->GetStartDate(&first_recorded_time_);
// Start expiring old stuff.
@@ -31,7 +31,7 @@
}
void HistoryBackend::OnMemoryPressure(
@@ -1561,6 +1563,8 @@ void HistoryBackend::AddPagesWithDetails
@@ -1549,6 +1551,8 @@ void HistoryBackend::AddPagesWithDetails
}
bool HistoryBackend::IsExpiredVisitTime(const base::Time& time) const {
@@ -11,7 +11,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -203,7 +203,8 @@ class SSLClientSocketImpl::SSLContext {
@@ -198,7 +198,8 @@ class SSLClientSocketImpl::SSLContext {
SSL_CTX_sess_set_new_cb(ssl_ctx_.get(), NewSessionCallback);
SSL_CTX_set_timeout(ssl_ctx_.get(), 1 * 60 * 60 /* one hour */);
@@ -3,7 +3,7 @@
--- a/chrome/browser/ui/startup/infobar_utils.cc
+++ b/chrome/browser/ui/startup/infobar_utils.cc
@@ -131,7 +131,8 @@ void AddInfoBarsIfNecessary(Browser* bro
@@ -136,7 +136,8 @@ void AddInfoBarsIfNecessary(Browser* bro
}
// Web apps should not display the session restore bubble (crbug.com/1264121)
@@ -8,7 +8,7 @@
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
@@ -36,6 +37,7 @@
@@ -35,6 +36,7 @@
#include "chrome/browser/ui/views/side_panel/side_panel_ui.h"
#include "chrome/browser/ui/views/toolbar/toolbar_action_hover_card_controller.h"
#include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h"
@@ -16,7 +16,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/feature_engagement/public/event_constants.h"
@@ -545,6 +547,17 @@ void ExtensionsToolbarContainer::AnchorA
@@ -544,6 +546,17 @@ void ExtensionsToolbarContainer::AnchorA
widget->widget_delegate()->AsBubbleDialogDelegate()->SetAnchorView(
anchor_view && anchor_view->GetVisible() ? anchor_view
: GetExtensionsButton());
@@ -34,7 +34,7 @@
widget->Show();
}
@@ -944,6 +957,9 @@ void ExtensionsToolbarContainer::UpdateC
@@ -943,6 +956,9 @@ void ExtensionsToolbarContainer::UpdateC
}
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2265,6 +2265,10 @@ void BrowserView::ExitFullscreen() {
@@ -2370,6 +2370,10 @@ void BrowserView::ExitFullscreen() {
void BrowserView::UpdateExclusiveAccessBubble(
const ExclusiveAccessBubbleParams& params,
ExclusiveAccessBubbleHideCallback first_hide_callback) {
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1178,7 +1178,11 @@ void Tab::UpdateIconVisibility() {
@@ -1174,7 +1174,11 @@ void Tab::UpdateIconVisibility() {
// Close button is shown on active tabs regardless of the size.
showing_close_button_ = true;
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -12,7 +12,7 @@
showing_alert_indicator_ =
has_alert_icon && alert_icon_width <= available_width;
@@ -1207,6 +1211,8 @@ void Tab::UpdateIconVisibility() {
@@ -1203,6 +1207,8 @@ void Tab::UpdateIconVisibility() {
!controller_->IsLockedForOnTask() &&
#endif
large_enough_for_close_button;
@@ -0,0 +1,65 @@
--- a/chrome/browser/ungoogled_flag_entries.h
+++ b/chrome/browser/ungoogled_flag_entries.h
@@ -144,4 +144,8 @@
"Spoof WebGL Info",
"Return generic values for WebGLDebugRendererInfo to remove a potential data leak while preventing potential website breakage. ungoogled-chromium flag.",
kOsAll, FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kSpoofWebGLInfo, kSpoofWebGLChoices, "SpoofWebGLInfo")},
+ {"increase-incognito-storage-quota",
+ "Increases the storage quota for Incognito and Guest profiles",
+ "Makes Incognito and Guest profiles compute the storage quota with the same algorithm that regular profiles use. This makes it harder for websites to detect Incognito mode, but may allow sites to induce heavy memory pressure. ungoogled-chromium flag.",
+ kOsAll, FEATURE_VALUE_TYPE(storage::features::kIncreaseIncognitoStorageQuota)},
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/storage/browser/quota/quota_features.cc
+++ b/storage/browser/quota/quota_features.cc
@@ -41,5 +41,9 @@ BASE_FEATURE(kStaticStorageQuota,
"StaticStorageQuota",
base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kIncreaseIncognitoStorageQuota,
+ "IncreaseIncognitoStorageQuota",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
} // namespace features
} // namespace storage
--- a/storage/browser/quota/quota_features.h
+++ b/storage/browser/quota/quota_features.h
@@ -23,6 +23,8 @@ extern const base::FeatureParam<double>
COMPONENT_EXPORT(STORAGE_BROWSER) BASE_DECLARE_FEATURE(kStaticStorageQuota);
+COMPONENT_EXPORT(STORAGE_BROWSER) BASE_DECLARE_FEATURE(kIncreaseIncognitoStorageQuota);
+
} // namespace features
} // namespace storage
--- a/storage/browser/quota/quota_settings.cc
+++ b/storage/browser/quota/quota_settings.cc
@@ -9,6 +9,7 @@
#include <memory>
#include <utility>
+#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/no_destructor.h"
#include "base/numerics/safe_conversions.h"
@@ -55,7 +56,8 @@ std::optional<QuotaSettings> CalculateNo
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::MAY_BLOCK);
- if (is_incognito) {
+ if (is_incognito &&
+ !base::FeatureList::IsEnabled(features::kIncreaseIncognitoStorageQuota)) {
return CalculateIncognitoDynamicSettings(
device_info_helper->AmountOfPhysicalMemory());
}
@@ -116,7 +118,9 @@ std::optional<QuotaSettings> CalculateNo
QuotaSettings settings;
- int64_t total = device_info_helper->AmountOfTotalDiskSpace(partition_path);
+ int64_t total =
+ is_incognito ? device_info_helper->AmountOfPhysicalMemory()
+ : device_info_helper->AmountOfTotalDiskSpace(partition_path);
if (total == -1) {
LOG(ERROR) << "Unable to compute QuotaSettings.";
return std::nullopt;
@@ -40,7 +40,7 @@
// Low entropy client hints.
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -19,6 +19,7 @@
@@ -20,6 +20,7 @@
namespace blink::features {
BASE_FEATURE(kDisableLinkDrag, "DisableLinkDrag", base::FEATURE_DISABLED_BY_DEFAULT);
@@ -31,7 +31,7 @@
data, container_policy);
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -20,6 +20,7 @@ namespace blink::features {
@@ -21,6 +21,7 @@ namespace blink::features {
BASE_FEATURE(kDisableLinkDrag, "DisableLinkDrag", base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kReducedSystemInfo, "ReducedSystemInfo", base::FEATURE_DISABLED_BY_DEFAULT);
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -464,6 +464,17 @@ void ToolbarView::Init() {
@@ -471,6 +471,17 @@ void ToolbarView::Init() {
browser_->profile()->IsGuestSession() ||
browser_->profile()->IsRegularProfile();
#endif
@@ -58,7 +58,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -21,6 +21,11 @@ namespace blink::features {
@@ -22,6 +22,11 @@ namespace blink::features {
BASE_FEATURE(kDisableLinkDrag, "DisableLinkDrag", base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kReducedSystemInfo, "ReducedSystemInfo", base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kRemoveClientHints, "RemoveClientHints", base::FEATURE_DISABLED_BY_DEFAULT);
@@ -86,7 +86,7 @@
// Feature declarations and associated constants (feature params, et cetera)
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -3897,6 +3897,8 @@ ScriptValue WebGLRenderingContextBase::g
@@ -3915,6 +3915,8 @@ ScriptValue WebGLRenderingContextBase::g
pname, IdentifiabilityBenignStringToken(
String(ContextGL()->GetString(GL_RENDERER))));
}
@@ -95,7 +95,7 @@
return WebGLAny(script_state,
String(ContextGL()->GetString(GL_RENDERER)));
}
@@ -3912,6 +3914,8 @@ ScriptValue WebGLRenderingContextBase::g
@@ -3930,6 +3932,8 @@ ScriptValue WebGLRenderingContextBase::g
pname, IdentifiabilityBenignStringToken(
String(ContextGL()->GetString(GL_VENDOR))));
}
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4619,10 +4619,12 @@ const FeatureEntry::FeatureVariation
@@ -4732,10 +4732,12 @@ const FeatureEntry::FeatureVariation kHi
#include "chrome/browser/ungoogled_flag_choices.h"
#include "chrome/browser/bromite_flag_choices.h"
#include "chrome/browser/ungoogled_platform_flag_choices.h"
@@ -15,7 +15,7 @@
#include "build/chromeos_buildflags.h"
--- /dev/null
+++ b/chrome/browser/existing_switch_flag_choices.h
@@ -0,0 +1,21 @@
@@ -0,0 +1,19 @@
+// Copyright (c) 2023 The ungoogled-chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE.ungoogled_chromium file.
@@ -23,9 +23,7 @@
+#ifndef CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+#define CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
+const FeatureEntry::Choice kWebRTCIPPolicy[] = {
+ {"Disable non proxied udp",
+ "",
+ ""},
+ {"Disable non proxied udp", "", ""},
+ {"Default",
+ "webrtc-ip-handling-policy",
+ "default"},
@@ -19,7 +19,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -166,6 +166,7 @@
@@ -168,6 +168,7 @@
#include "services/network/public/cpp/permissions_policy/fenced_frame_permissions_policies.h"
#include "services/network/public/cpp/permissions_policy/permissions_policy_declaration.h"
#include "services/network/public/cpp/permissions_policy/permissions_policy_features.h"
@@ -27,7 +27,7 @@
#include "services/network/public/cpp/resource_request_body.h"
#include "services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h"
#include "services/network/public/cpp/url_loader_completion_status.h"
@@ -386,10 +387,10 @@ void AddAdditionalRequestHeaders(
@@ -388,10 +389,10 @@ void AddAdditionalRequestHeaders(
net::HttpRequestHeaders::kUserAgent,
ComputeUserAgentValue(*headers, user_agent_override, browser_context));
@@ -52,7 +52,7 @@
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "services/network/public/mojom/restricted_cookie_manager.mojom.h"
@@ -4666,10 +4667,13 @@ void RenderFrameImpl::FinalizeRequestInt
@@ -4664,10 +4665,13 @@ void RenderFrameImpl::FinalizeRequestInt
request.SetHasUserGesture(frame_->HasTransientUserActivation());
@@ -13,7 +13,7 @@
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -14,6 +14,8 @@
@@ -18,6 +18,8 @@
namespace net::features {
@@ -35,7 +35,7 @@
// https://vasilvv.github.io/httpbis-alps/draft-vvv-httpbis-alps.html.
--- a/net/dns/host_resolver_manager.cc
+++ b/net/dns/host_resolver_manager.cc
@@ -153,11 +153,6 @@ const size_t kMaxHostLength = 4096;
@@ -152,11 +152,6 @@ const size_t kMaxHostLength = 4096;
// cached.
const int kIPv6ProbePeriodMs = 1000;
@@ -47,7 +47,7 @@
// True if |hostname| ends with either ".local" or ".local.".
bool ResemblesMulticastDNSName(std::string_view hostname) {
return hostname.ends_with(".local") || hostname.ends_with(".local.");
@@ -1490,33 +1485,10 @@ int HostResolverManager::StartIPv6Reacha
@@ -1489,33 +1484,10 @@ int HostResolverManager::StartIPv6Reacha
return OK;
}
@@ -165,7 +165,7 @@
--- a/chrome/browser/ui/search_engines/edit_search_engine_controller.h
+++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.h
@@ -23,7 +23,8 @@ class EditSearchEngineControllerDelegate
@@ -22,7 +22,8 @@ class EditSearchEngineControllerDelegate
virtual void OnEditedKeyword(TemplateURL* template_url,
const std::u16string& title,
const std::u16string& keyword,
@@ -175,7 +175,7 @@
protected:
virtual ~EditSearchEngineControllerDelegate() = default;
@@ -54,6 +55,8 @@ class EditSearchEngineController {
@@ -53,6 +54,8 @@ class EditSearchEngineController {
// character results in a valid url.
bool IsURLValid(const std::string& url_input) const;
@@ -184,7 +184,7 @@
// Returns true if the value of |keyword_input| represents a valid keyword.
// The keyword is valid if it is non-empty and does not conflict with an
// existing entry. NOTE: this is just the keyword, not the title and url.
@@ -62,7 +65,8 @@ class EditSearchEngineController {
@@ -61,7 +64,8 @@ class EditSearchEngineController {
// Completes the add or edit of a search engine.
void AcceptAddOrEdit(const std::u16string& title_input,
const std::u16string& keyword_input,
@@ -271,7 +271,7 @@
bool CanEdit(const TemplateURL* url) const;
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
@@ -207,21 +207,25 @@ void TemplateURLTableModel::Remove(size_
@@ -201,21 +201,25 @@ void TemplateURLTableModel::Remove(size_
void TemplateURLTableModel::Add(size_t index,
const std::u16string& short_name,
const std::u16string& keyword,
@@ -302,7 +302,7 @@
DCHECK(index <= RowCount());
DCHECK(!url.empty());
TemplateURL* template_url = GetTemplateURL(index);
@@ -230,7 +234,8 @@ void TemplateURLTableModel::ModifyTempla
@@ -224,7 +228,8 @@ void TemplateURLTableModel::ModifyTempla
DCHECK(template_url_service_->GetDefaultSearchProvider() != template_url ||
template_url->SupportsReplacement(
template_url_service_->search_terms_data()));
@@ -314,7 +314,7 @@
TemplateURL* TemplateURLTableModel::GetTemplateURL(size_t index) {
--- a/chrome/browser/ui/search_engines/template_url_table_model.h
+++ b/chrome/browser/ui/search_engines/template_url_table_model.h
@@ -61,13 +61,15 @@ class TemplateURLTableModel : public ui:
@@ -58,13 +58,15 @@ class TemplateURLTableModel : public ui:
void Add(size_t index,
const std::u16string& short_name,
const std::u16string& keyword,
@@ -334,7 +334,7 @@
void ReloadIcon(size_t index);
--- a/chrome/browser/ui/webui/settings/search_engines_handler.cc
+++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc
@@ -50,6 +50,7 @@ namespace {
@@ -49,6 +49,7 @@ namespace {
const char kSearchEngineField[] = "searchEngine";
const char kKeywordField[] = "keyword";
const char kQueryUrlField[] = "queryUrl";
@@ -351,7 +351,7 @@
dict.Set("urlLocked", ((template_url->prepopulate_id() > 0) ||
(template_url->starter_pack_id() > 0)));
GURL icon_url = template_url->favicon_url();
@@ -414,12 +417,14 @@ void SearchEnginesHandler::HandleSearchE
@@ -418,12 +421,14 @@ void SearchEnginesHandler::HandleSearchE
void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url,
const std::u16string& title,
const std::u16string& keyword,
@@ -369,7 +369,7 @@
}
edit_controller_.reset();
@@ -449,6 +454,8 @@ bool SearchEnginesHandler::CheckFieldVal
@@ -453,6 +458,8 @@ bool SearchEnginesHandler::CheckFieldVal
is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value));
} else if (field_name.compare(kQueryUrlField) == 0) {
is_valid = edit_controller_->IsURLValid(field_value);
@@ -378,7 +378,7 @@
} else {
NOTREACHED();
}
@@ -471,18 +478,21 @@ void SearchEnginesHandler::HandleSearchE
@@ -475,18 +482,21 @@ void SearchEnginesHandler::HandleSearchE
return;
}
@@ -428,7 +428,7 @@
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -1006,7 +1006,8 @@ void TemplateURLService::IncrementUsageC
@@ -998,7 +998,8 @@ void TemplateURLService::IncrementUsageC
void TemplateURLService::ResetTemplateURL(TemplateURL* url,
const std::u16string& title,
const std::u16string& keyword,
@@ -438,7 +438,7 @@
DCHECK(!IsCreatedByExtension(url));
DCHECK(!keyword.empty());
DCHECK(!search_url.empty());
@@ -1021,6 +1022,7 @@ void TemplateURLService::ResetTemplateUR
@@ -1013,6 +1014,7 @@ void TemplateURLService::ResetTemplateUR
data.safe_for_autoreplace = false;
data.last_modified = clock_->Now();
data.is_active = TemplateURLData::ActiveStatus::kTrue;
@@ -448,7 +448,7 @@
syncer::kSeparateLocalAndAccountSearchEngines)
--- a/components/search_engines/template_url_service.h
+++ b/components/search_engines/template_url_service.h
@@ -346,7 +346,8 @@ class TemplateURLService final : public
@@ -341,7 +341,8 @@ class TemplateURLService final : public
void ResetTemplateURL(TemplateURL* url,
const std::u16string& title,
const std::u16string& keyword,
@@ -1,6 +1,6 @@
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4615,7 +4615,13 @@ const FeatureEntry::FeatureVariation
@@ -4728,7 +4728,13 @@ const FeatureEntry::FeatureVariation kHi
// calculate and verify checksum.
//
// When adding a new choice, add it to the end of the list.
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -109,7 +109,7 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -125,7 +125,7 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
@@ -1,6 +1,6 @@
--- a/chrome/browser/ui/toolbar/chrome_labs/chrome_labs_utils.cc
+++ b/chrome/browser/ui/toolbar/chrome_labs/chrome_labs_utils.cc
@@ -144,35 +144,6 @@ bool AreNewChromeLabsExperimentsAvailabl
@@ -140,35 +140,6 @@ bool AreNewChromeLabsExperimentsAvailabl
}
bool IsChromeLabsEnabled() {
@@ -142,7 +142,7 @@
} // namespace download
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -131,7 +131,6 @@ source_set("browser") {
@@ -132,7 +132,6 @@ source_set("browser") {
"//components/performance_manager/scenario_api",
"//components/power_monitor",
"//components/services/filesystem:lib",
@@ -3,7 +3,7 @@
--- a/chrome/browser/intranet_redirect_detector.cc
+++ b/chrome/browser/intranet_redirect_detector.cc
@@ -118,9 +118,7 @@ void IntranetRedirectDetector::FinishSle
@@ -117,9 +117,7 @@ void IntranetRedirectDetector::FinishSle
simple_loaders_.clear();
resulting_origins_.clear();
@@ -2,7 +2,7 @@
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -2089,7 +2089,7 @@ BASE_FEATURE(kPrefetchFontLookupTables,
@@ -2099,7 +2099,7 @@ BASE_FEATURE(kPrefetchFontLookupTables,
// crbug.com/988956.
BASE_FEATURE(kPrefetchPrivacyChanges,
"PrefetchPrivacyChanges",
@@ -2,7 +2,7 @@
--- a/build/config/locales.gni
+++ b/build/config/locales.gni
@@ -166,12 +166,6 @@ _non_android_locales = [ "cy" ]
@@ -186,12 +186,6 @@ _non_android_locales = [ "cy" ]
# Setup |platform_pak_locales| for each platform.
platform_pak_locales = all_chrome_locales

Some files were not shown because too many files have changed in this diff Show More