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

Disables several blink runtime features. #6933

Merged
merged 2 commits into from
Jan 28, 2021

Conversation

mkarolin
Copy link
Collaborator

@mkarolin mkarolin commented Oct 22, 2020

Fixes brave/brave-browser#11133
Fixes brave/brave-browser#11407
Fixes brave/brave-browser#11546
Fixes brave/brave-browser#11547

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@mkarolin mkarolin self-assigned this Oct 22, 2020
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch 2 times, most recently from 268e53d to f003ca2 Compare October 30, 2020 23:35
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch 4 times, most recently from d0e7793 to 1b5b6fa Compare November 25, 2020 00:47
@mkarolin mkarolin changed the title WIP: disables several blink runtime features. Disables several blink runtime features. Nov 25, 2020
@mkarolin mkarolin marked this pull request as ready for review November 25, 2020 14:28
@mkarolin mkarolin requested a review from a team as a code owner November 25, 2020 14:28
Copy link
Contributor

@AlexeyBarabash AlexeyBarabash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return
rel_path_parts = rel_path.split(os.sep, 3)
if rel_path_parts[0] in OUT_DIR_NAMES:
if rel_path_parts[2] == 'gen':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch from 47ceb5f to 76c509d Compare November 30, 2020 22:02
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch from 76c509d to b0d2a3c Compare December 12, 2020 16:27
@mkarolin
Copy link
Collaborator Author

Rebased.

@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch 3 times, most recently from 6a7ef0d to efbbadb Compare December 14, 2020 17:18
@mkarolin
Copy link
Collaborator Author

Both Linux and Android have lint (format) errors in files that aren't related to this PR.
iOS has a known unit tests failure (AdsWrapperTest testPreferencePersistance) unrelated to this PR.

@mkarolin mkarolin closed this Dec 14, 2020
@mkarolin mkarolin reopened this Dec 14, 2020
@mkarolin
Copy link
Collaborator Author

@bridiver, PTAL when you can.

@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch from efbbadb to ad05f75 Compare January 7, 2021 19:48
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch 2 times, most recently from e3b3ae0 to af3b9ab Compare January 8, 2021 20:44
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch from af3b9ab to 237664b Compare January 25, 2021 18:25
void SetUp() override { InProcessBrowserTest::SetUp(); }
void SetUp() override {
// Test that even with Lang CH feature enabled, there is no header.
scoped_feature_list_.InitAndEnableFeature(features::kLangClientHintHeader);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we test with this both enabled and disabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed by 296d753

Fixes brave/brave-browser#11133
Fixes brave/brave-browser#11407
Fixes brave/brave-browser#11546
Fixes brave/brave-browser#11547

- Disables features via Chromium features:
  * Direct Sockets
  * Lang Client Hint Header
  * Signed Exchange Prefetch Cache For Navigations
  * Subresource Web Bundles

- Disabled the following blink features in
  BraveContentRendererClient::SetRuntimeFeaturesDefaultsBeforeBlinkInitialization
  since they don't have Chromium features:
  * Digital Goods
  * Native File System (File System Access)
- Added browser tests for these features

- Modified redirect-cc.py to allow overriding files under out/XXX/gen

- Added an override for blink::origin_trials::IsTrialValid and overrides
  for blink::OriginTrialContext methods AddFeature and AddForceEnabledTrials
  for trials:
  * NativeFileSystem2
  * SignedExchangeSubresourcePrefetch
  * SubresourceWebBundles
- Added browser tests for trials disablement.
The parameter flips Lang CH feature enabled/disabled.
@mkarolin mkarolin force-pushed the maxk-disable-sxg-web-bundles-2 branch from 237664b to 296d753 Compare January 27, 2021 22:16
@mkarolin
Copy link
Collaborator Author

Windows CI failure is not related to this PR (certificate issue).

@mkarolin mkarolin merged commit a814ad2 into master Jan 28, 2021
@mkarolin mkarolin deleted the maxk-disable-sxg-web-bundles-2 branch January 28, 2021 01:29
@mkarolin mkarolin added this to the 1.21.x - Nightly milestone Jan 28, 2021
brave-builds pushed a commit that referenced this pull request Jan 28, 2021
brave-builds pushed a commit that referenced this pull request Jan 28, 2021
mkarolin pushed a commit that referenced this pull request Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants