Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from Chromium 130 to Chromium 131. #25662

Open
wants to merge 145 commits into
base: master
Choose a base branch
from
Open

Upgrade from Chromium 130 to Chromium 131. #25662

wants to merge 145 commits into from

Conversation

mkarolin
Copy link
Collaborator

Resolves brave/brave-browser#41130

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@github-actions github-actions bot added CI/run-network-audit Run network-audit CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/storybook-url Deploy storybook and provide a unique URL for each build CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) feature/web3/wallet feature/web3/wallet/core labels Sep 19, 2024
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

samartnik and others added 25 commits October 17, 2024 13:40
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a94a47d595aa23f7b69db524f490a8bc3559246c

Android: Fix UnusedVariable Error Prone warnings in //chrome/browser

Found by un-disabling the check within compile_java.py

Bug: 372458640
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/6de234baff1d12fdb8224d12667853ab4fe4c0b1

[Tab Model] Split TabModelFilter into interface and ABC

See bug for details on phasing. This is phase 1 which splits the
TabModelFilter into an interface and a base class.

The base class will go away once all phases are finished.

Bug: 372068933
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/df77cbacb9476b0b6d3e75cc34b5d127985e79c3

[Settings] Enable the single-activity mode by default

Bug: b/356743945

https://source.chromium.org/chromium/chromium/src/+/cd5fd3e6bcef39a904578857a4c1ab2419efacec

[Settings] Add a method to finish the current fragment

Some settings page need to finish when the user is done with them.
Previously we used getActivity().onBackPressed() to perform this, but
we might want to handle finish and back gesture differently, and also it
might have unintended interaction with metrics.

This patch introduces a canonical method for settings fragments to
declare that they are finished and the settings activity should show the
previous fragment.

We added the new method to SettingsLauncher because existing methods are
somewhat similar to the new one (handling navigation). In a later change
we plan to rename it to reflect the new addition.

Bug: b/356743945
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d004977e47c6aff2833c145caa7c183993f56524

[DevTools] move feature flags to the devtools directory

As instructed by the comment in chrome/browser/browser_features.h
that indicates that new feature flags should not be added to
chrome/browser/browser_features.h

Fixed: 370684557
This change corrects the type reference, but it also renames the local
variables to reflect the new type.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c521bd420a710b3699c528540b94383aa74f602d
https://chromium.googlesource.com/chromium/src/+/fedc5005177316fc76dabf526ff9e105a049fe5b

commit c521bd420a710b3699c528540b94383aa74f602d
Author: Aliona DANGLA <[email protected]>
Date:   Wed Oct 9 08:35:42 2024 +0000

    [iOS] Updates files under ios/chrome/browser/shared

    Fixed: 365532210, 370949567, 358060031, 358059298, 361071553

commit fedc5005177316fc76dabf526ff9e105a049fe5b
Author: Aliona DANGLA <[email protected]>
Date:   Wed Oct 9 09:42:48 2024 +0000

    [iOS] Remove GetBrowserState function

    Fixed: 358301380, 369816840, 365531685, 365529650
This provider is required for our linking.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/efca6d6cbe579048507390bd803d49039e9951db

commit efca6d6cbe579048507390bd803d49039e9951db
Author: Gauthier Ambard <[email protected]>
Date:   Tue Oct 8 15:16:36 2024 +0000

    [iOS] Use provider for ShareKitFactory

    Now that we have an implementation of the provider everywhere, use it
    in the factory to create the service.

    Bug: 358373145
Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/beb0649ca837e

commit beb0649ca837e64e0448b618dd46de480183d65b
Author: Teresa Mao <[email protected]>
Date:   Tue Oct 8 20:35:15 2024 +0000

    WebUI: Migrate SettingsUI to WebUIConfig.

    Bug: 40222519
    Fixed: 361535277
The constructor is the correct way to pass a vector.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/64539de59ddc802c4c05407f04ae4c4699ac1596

commit 64539de59ddc802c4c05407f04ae4c4699ac1596
Author: Avi Drissman <[email protected]>
Date:   Thu Oct 10 22:32:27 2024 +0000

    Remove RefCountedBytes::TakeVector

    It's not needed, as there's a constructor.

    Fixed: 372269603
The `TabDeclutterController` instance was being retrieved through
`Browser*`, however there's some work to make different UI components to
not have to rely on the browser instance for things of this kind.

This change plumbs `tabs::TabDeclutterController*` through our classes
so it can reach its required place.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/9e5aae5a1ca1015b37c504c0668d46eb87946664

commit 9e5aae5a1ca1015b37c504c0668d46eb87946664
Author: Thomas Lukaszewicz <[email protected]>
Date:   Thu Oct 10 17:26:14 2024 +0000

    [tab search] Pass TabDeclutterController to TabSearchBubbleHost

    Currently TabSearchBubbleHost is using its GetBrowser() accessor to
    gain access to the required TabDeclutterController.

    Current guidance is that direct dependencies on Browser should be
    avoided, instead feature code should compose their specific
    dependencies.

    This CL updates TabSearchBubbleHost to instead compose the required
    TabDeclutterController directly instead of relying on Browser.

    Follow up work will further refactor TabSearchBubbleHost to eliminate
    the Browser dependency completely and, composing only what is
    necessary.

    Bug: 371774521
`crypto::SymmetricKey` has been deprecated and the methods it was being
used for have been simplified and moved into `crypto::kdf`. This cahnges
adds support for our own overrid of `SymmetricKey`, adding our own
`DeriveKeyPbkdf2HmacSha256` into the `kdf` header.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4046edfc95050796d4a1bc54cdba6942257b6f38

commit 4046edfc95050796d4a1bc54cdba6942257b6f38
Author: Elly <[email protected]>
Date:   Thu Oct 10 20:51:36 2024 +0000

    crypto: add kdf interface

    Right now, //crypto supports KDFs via two interfaces:
    * PBKDF2-HMAC-SHA1 and Scrypt on crypto::SymmetricKey
    * HKDF-SHA256 via free functions

    This change:
    * Adds crypto::SubtlePassKey for access to subtle crypto primitives
    * Creates a new KDF interface
    * Moves the PBKDF2-HMAC-SHA1 and Scrypt implementations to that
      interface, and guards them with SubtlePassKeys
    * Adds new unit tests covering those KDFs
    * Deprecates SymmetricKey
    * Deletes many of the unit tests for SymmetricKey, which either covered
      logic which is now moved to the KDF implementations (and is covered by
      their tests) or tested key lengths we don't allow in production.

    Bug: 369653192, 369649346
This is a simple rename from a user's perspective.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/1eadd223cce221615fa18db6647451a26a0315a2

commit 1eadd223cce221615fa18db6647451a26a0315a2
Author: Gaurav Kumar <[email protected]>
Date:   Fri Oct 11 07:51:41 2024 +0000

    [views-ax] Migration of kName attribute in Tab

    This CL migrates the kName attribute in views to be updated
    whenever its value should change, rather than querying the value
    and computing it only when needed.

    As part of this change, the following views are updated:
    Tab, BrowserView, PermissionChipView, and TabSlotView. The Tab
    class extends TabSlotView. BrowserView::GetAccessibleTabLabel
     constructs the accessible name for a tab by gathering various
    properties such as the title, group, memory usage, and possibly
    other elements like permission chips, to create a comprehensive
    and accurate label.

    This CL is part of the ViewsAX project:
    https://docs.google.com/document/d/1Ku7HOyDsiZem1yaV6ccZ-tz3lO2XR2NEcm8HjR6d-VY/edit#heading=h.ke1u3utej413

    Bug: 325137417
This new url value is being replicated in brave's shadow file. For the
most part, it is not consequential to repeat its value, because this is
a `chrome://` url, and this is about history UI features that we are
most likely hinding.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/6201548495aa32b46a128ff7bbfd259765d6017d

commit 6201548495aa32b46a128ff7bbfd259765d6017d
Author: Zaina Al-Mashni <[email protected]>
Date:   Fri Oct 11 15:30:22 2024 +0000

    [Synapse] Update History Search promos to point to the new route

    If the AiSettingsPageRefresh is enabled, History Search settings route
    is chrome://settings/ai/historySearch. This change updates the
    remaining linkouts to the old History Search route.

    Bug: 362225975
The new naming is `kColorOmniboxIcon*`.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/e692b50e20ea51f29aa26869b385858e6d95c91e

commit e692b50e20ea51f29aa26869b385858e6d95c91e
Author: Elias Klim <[email protected]>
Date:   Mon Oct 14 09:50:26 2024 +0000

    Fix Google Lens button font color

    This CL fixes text color for Google Lens Omnibox button for custom theme.

    It adds kColorOmniboxIconForeground with values of
    kColorPageInfoForeground. The only difference is
    ui::GetColorWithMaxContrast(kColorToolbar) for a custom theme.

    Additionally, this CL refactors incorrectly names PageInfo colors.
    Particularly, multiple colors with names kColorPageInfo are used only
    in Omnibox as icon colors. Hence all such colors were renamed to
    kColorOmniboxIcon.

    Screenshots: https://g-issues.chromium.org/issues/372632553#comment6

    Bug: 372632553
Chromium implementation of DeriveKeyScrypt has a CHECK in it that would
crash the browser if the underlying BoringSSL function failed. We use
this code from HDKey::GenerateFromV3UTC where the data is retrieved from
JSON and can't be guaranteed to always be valid. In order not to crash,
added DeriveKeyScrypt implementation without the CHECK and also changed
our DeriveKeyPbkdf2HmacSha256 implementation to no use CHECK either.

Additionally, moved HDKey::GenerateFromV3UTC code to use DeriveKeyScrypt
and DeriveKeyPbkdf2HmacSha256 directly instead of using SymmetricKey
wrappers that are being deprecated.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4046edfc95050796d4a1bc54cdba6942257b6f38

commit 4046edfc95050796d4a1bc54cdba6942257b6f38
Author: Elly <[email protected]>
Date:   Thu Oct 10 20:51:36 2024 +0000

    crypto: add kdf interface

    Right now, //crypto supports KDFs via two interfaces:
    * PBKDF2-HMAC-SHA1 and Scrypt on crypto::SymmetricKey
    * HKDF-SHA256 via free functions

    This change:
    * Adds crypto::SubtlePassKey for access to subtle crypto primitives
    * Creates a new KDF interface
    * Moves the PBKDF2-HMAC-SHA1 and Scrypt implementations to that
      interface, and guards them with SubtlePassKeys
    * Adds new unit tests covering those KDFs
    * Deprecates SymmetricKey
    * Deletes many of the unit tests for SymmetricKey, which either covered
      logic which is now moved to the KDF implementations (and is covered by
      their tests) or tested key lengths we don't allow in production.

    Bug: 369653192, 369649346
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/65eee63c0e75ebd343c409a7c14addb00ca4b6dd

[Tab Model] Deprecate tab_groups package

Merge the tab_groups/ package into tabmodel/. The two packages have
significant overlap and should really have a lot of their logic merged
anyway.

This allows us to package protect TabGroupModelFilterInternal and make
destroy method package private as well.

Fixed: 372068933
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/db64d75a6190bc6f3b1014ba0462f391b2b35135

[bookmarks] Fetch favicons from google if they're not found locally

Bug: 368130323,368683034
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3d4bd05bd10bced9902f9dd06cf1ad19389c6ba2

Add EdgeToEdgeStateProvider to replace usage of #setDecorFitsSystemWindows

Bug: 369841366
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d15dc67556629c7f39c418cd6b81e03c48eee30c

[UPMAccessLossWarning] Add export flow final step metric

The new metric tracks the last step that the user took as part of the
export flow.

Change-Id: I5db5c776b476c49160b39e3f27ee0a50bd8a4d41
The drop shadow on window has changed.
Chromium's last id went up again and was conflicting with our ids
(specifically on MacOS causing a crash constructing Help menu).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-audit-deps Check for known npm/cargo vulnerabilities (audit_deps) CI/run-network-audit Run network-audit CI/run-upstream-tests Run upstream unit and browser tests on Linux and Windows (otherwise only on Linux) CI/storybook-url Deploy storybook and provide a unique URL for each build feature/web3/wallet/core feature/web3/wallet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade from Chromium 130 to Chromium 131
10 participants