Commit Graph
27627 Commits
Author SHA1 Message Date
Aleksey Seren 0b6ae7fa6c Moved NotificationHelper to //brave/browser/brave_ads
fix https://github.com/brave/brave-browser/issues/17630
2021-12-08 12:05:09 +07:00
Aleksey Seren 1249ba8410 Moved BackgroundHelper to //brave/browser/brave_ads
fix https://github.com/brave/brave-browser/issues/17628
2021-12-08 12:05:09 +07:00
Aleksey Seren e164f1a02f Moved AdsServiceImpl to //brave/browser/brave_ads
fix https://github.com/brave/brave-browser/issues/17628
2021-12-08 12:05:06 +07:00
Serg 2a295cd7e3 Merge pull request #11484 from brave/android_wallet_biometric
Adds check on Activity state to show BiometricPrompt and also disables it on restore screen
2021-12-07 22:09:08 -05:00
Brian Johnson 3b6920e5de Merge pull request #10664 from brave/cr97 2021-12-07 19:50:20 -07:00
Max 57d11c4957 Merge pull request #11453 from brave/maxk-1.33.x-l10n
Updated l10n for 1.33.x release.
2021-12-07 21:28:52 -05:00
Brian R. Bondy 06e3b2c78f Merge pull request #11460 from brave/services-key-ratio-server
Pass Brave services key to the ratio server
2021-12-07 20:27:54 -05:00
Simon Hong b28f2d7820 Merge pull request #11465 from brave/update_chromium_src_url_constants
Fixed wrong  kChromeUIUntrustedNewTabPageBackgroundUrl constants
2021-12-08 09:28:34 +09:00
Anthony Tseng 487c270303 Propagate approve transaction callback down to PublishTransaction 2021-12-07 16:04:00 -08:00
brave-builds d16cc592d0 1.35.16 2021-12-08 00:01:47 +00:00
Douglas Daniel 0afab87757 Implemented Default Currencies in Wallet UI 2021-12-07 15:24:55 -07:00
Douglas Daniel a1ee305591 Merge pull request #11456 from brave/use-common-password-validation
Use Common Password Validation on Desktop
2021-12-07 15:19:09 -07:00
Deep 1976f39f54 Add condition for binance widget 2021-12-07 15:56:04 -05:00
Deep 4afb3483cc Revert "Merge pull request #11148 from brave/remove_binance_widget_android"
This reverts commit fdd944dcdc, reversing
changes made to c99d30ee8b.
2021-12-07 15:56:04 -05:00
mkarolin f9c9491c13 Updated l10n for 1.33.x release. 2021-12-07 15:53:21 -05:00
Serg d35b51ad83 Adds check on Activity state to show BiometricPrompt and also disables it on restore screen 2021-12-07 15:52:38 -05:00
Brian R. Bondy 7f944b926f Pass Brave services key to the ratio server 2021-12-07 15:14:31 -05:00
samartnik 4c7bfd6d71 [Android] Explicitly specified button type for rewards panel
Otherwise it falls back to MaterialButton and causes styling issues.
2021-12-07 14:48:56 -05:00
samartnik 15c825119a [Android] New c-tors for ToolbarManager and TopToolbarCoordinator 2021-12-07 14:48:56 -05:00
mkarolin cacfa265d7 Updated strings for Chromium 97.0.4692.36. 2021-12-07 14:48:55 -05:00
mkarolin 4bb9b2a552 Updated patches from Chromium 97.0.4692.20 to Chromium 97.0.4692.36. 2021-12-07 14:48:54 -05:00
mkarolin 7f9abdddc4 Conflict-resolved patches from Chromium 97.0.4692.20 to Chromium 97.0.4692.36. 2021-12-07 14:48:54 -05:00
mkarolin a3b1a5ac20 Update from Chromium 97.0.4692.20 to Chromium 97.0.4692.36. 2021-12-07 14:46:11 -05:00
Mario Sanchez Prada d46e47c3dd Disable Remote Optimization Guide features.
From cr97 on, having this feature enabled means that the browser will
attempt to reach the Optimization Guide Server every now and then at
the https://optimizationguide-pa.googleapis.com endpoint, as it was
detected by the npm run network-audit command:

  [:ERROR:brave_network_audit_browsertest.cc(151)] NETWORK AUDIT FAIL:https://optimizationguide-pa.googleapis.com/v1:GetModels?key=dummytoken
  [:ERROR:brave_network_audit_browsertest.cc(151)] NETWORK AUDIT FAIL:https://optimizationguide-pa.googleapis.com/v1:GetModels?key=dummytoken

    [...]

  [:ERROR:brave_network_audit_browsertest.cc(151)] NETWORK AUDIT FAIL:https://optimizationguide-pa.googleapis.com/v1:GetModels?key=dummytoken
  ../../brave/browser/net/brave_network_audit_browsertest.cc:249: Failure
  Value of: PerformNetworkAuditProcess(events)
    Actual: false
  Expected: true
  network-audit FAILED. Import /home/mario/work/brave-rebases/brave-browser/src/network_log.json in chrome://net-internals for more details.
  Stack trace:
  #0 0x55f213f6cc10 brave::(anonymous namespace)::BraveNetworkAuditTest::TearDownInProcessBrowserTestFixture()
  #1 0x55f215bda3be content::BrowserTestBase::SetUp()
  #2 0x55f215bd741e InProcessBrowserTest::SetUp()

This patch disables the kkOptimizationHints feature. TBD if this is
needed.

This patch disables the kRemoteOptimizationGuideFetching features that
are otherwise enabled by default, avoiding this URL requests.

PS: I couldn't pinpoint yet where exactly in Chromium 97 this started
happening, but I can consistently reproduce it on my local cr97 branch
setting kMaxTimeoutPerLoadedURL in brave_network_audit_browsertest.cc
to at least 20 seconds, while this doesn't happen on cr96 even when
using the default timeout of 5 minutes, so it's cr97-related.
2021-12-07 14:46:10 -05:00
Sergey P e6b26aff09 Updated IPFS Page info dialog to new version
Chromium change:

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

commit fdf5d8eb7fb14333f433299f3acb0a98e979a6dd
Author: Olesia Marukhno <olesiamarukhno@google.com>
Date:   Tue Nov 2 15:43:55 2021 +0000

    [page info] Clean up PageInfoV2Desktop flag

    After launching page info, remove the flag and code that supports old
    bubble view.

    Bug: 1188101
2021-12-07 14:46:08 -05:00
mkarolin 49a2cc40e1 [MacOS] Move relauchOnMac out of WebUI.
When building tests the following error happens:

17:40:57  gen/chrome/test/data/webui/settings/preprocessed/test_lifetime_browser_proxy.ts:11:14 - error TS2420: Class 'TestLifetimeBrowserProxy' incorrectly implements interface 'LifetimeBrowserProxy'.
17:40:57    Property 'relaunchOnMac' is missing in type 'TestLifetimeBrowserProxy' but required in type 'LifetimeBrowserProxy'.
17:40:57
17:40:57  11 export class TestLifetimeBrowserProxy extends TestBrowserProxy implements
17:40:57                  ~~~~~~~~~~~~~~~~~~~~~~~~
17:40:57
17:40:57    gen/chrome/browser/resources/settings/tsc/lifetime_browser_proxy.d.ts:4:5
17:40:57      4     relaunchOnMac(): void;
17:40:57            ~~~~~~~~~~~~~~~~~~~~~~
17:40:57      'relaunchOnMac' is declared here.

which means we'd have to add a patch to test_lifetime_proxy.ts to add our relaunchOnMac functionality.

Instead, this change removes all relaunchOnMac functionality from WebUI and moves it
into the BrowserLifetimeHandler.
2021-12-07 14:46:07 -05:00
mkarolin a0d0719232 Drop --disable-gpu-sandbox flag for browser tests on Windows.
The flag is no longer needed: the tests run normally on CI without it.
2021-12-07 14:46:05 -05:00
mkarolin d02ae11cb5 Updated strings for Chromium 97.0.4692.20. 2021-12-07 14:46:04 -05:00
mkarolin f5b973d434 Updated patches from Chromium 97.0.4692.8 to Chromium 97.0.4692.20. 2021-12-07 14:46:03 -05:00
mkarolin d929190f50 Conflict-resolved patches from Chromium 97.0.4692.8 to Chromium 97.0.4692.20. 2021-12-07 14:46:03 -05:00
mkarolin 568a911d3c Update from Chromium 97.0.4692.8 to Chromium 97.0.4692.20. 2021-12-07 14:46:02 -05:00
samartnik cae7541ea0 [Android] Fix for unit tests
Removed obsolete check
2021-12-07 14:46:01 -05:00
mkarolin 8b27963983 Pylint fixes. 2021-12-07 14:46:01 -05:00
mkarolin 8df62f160e Lint fix. 2021-12-07 14:46:00 -05:00
mkarolin 36015fdb28 Updated check_chromium_src.py script.
- Added BUILD.gn files to exclusions
- Added *test.mm files to exclusions
- Alphabetized exclusions
2021-12-07 14:45:59 -05:00
mkarolin 659f8626de Fixes incorrect number of ../ in a chromium_src override. 2021-12-07 14:45:58 -05:00
samartnik 86959248bf [Android] Reorganized code to avoid patching for bytecode warnings
This reverts previous commit:

[Android] Filter warning after bytecode pacthing
With new R8 library there is a warning related to our bytecode patching:
Warning: Missing method void Lg2.d() (referenced from: void Vf2.run())

Without obfuscation it looks like this:
Warning: Missing method void org.chromium.chrome.browser.toolbar.ToolbarManager.$invoke$special$updateButtonStatus() (referenced from: void org.chromium.chrome.browser.toolbar.ToolbarManager$$ExternalSyntheticLambda3.run())

We do change invoke special to invoke virtual for this method and this is expected.

Chromium change:
chromium/chromium@e3db48a

Android: Stop disabling R8's allowaccessmodification -keep semantics
Causes a 5.5kb regression, but brings us closer to stock R8, and will
ensure visibility of test @rule fields are not changed, thus avoiding
bugs like bug 1265431.

Bug: 1265431
2021-12-07 14:45:58 -05:00
samartnik e8506fbe2b [Android] Filter warning after bytecode pacthing
With new R8 library there is a warning related to our bytecode patching:
Warning: Missing method void Lg2.d() (referenced from: void Vf2.run())

Without obfuscation it looks like this:
Warning: Missing method void org.chromium.chrome.browser.toolbar.ToolbarManager.$invoke$special$updateButtonStatus() (referenced from: void org.chromium.chrome.browser.toolbar.ToolbarManager$$ExternalSyntheticLambda3.run())

We do change invoke special to invoke virtual for this method and this is expected.

Chromium change:
https://github.com/chromium/chromium/commit/e3db48a5ea7b9e3165ad4a9e8d01dc0f1450191f

Android: Stop disabling R8's allowaccessmodification -keep semantics
Causes a 5.5kb regression, but brings us closer to stock R8, and will
ensure visibility of test @rule fields are not changed, thus avoiding
bugs like bug 1265431.

Bug: 1265431
2021-12-07 14:45:57 -05:00
samartnik bc400fb4c8 [Android] [Tests] Adds ability to include both v8 snapshot types
Chromium change:
https://github.com/chromium/chromium/commit/f7e3a4176bff898bbcfeba7dfc709a018fe08924

Adds ability to include both v8 snapshot types
And adds feature as to which one is used at runtime. Specific
parts:
. adds gn arg: include_both_v8_snapshots. At this time this is
  only supported on android. I will likely make it work on chromeos
  next.
. Adds feature kUseContextSnapshot. This feature is available if
  include_both_v8_snapshots is set.
. Adds switch kUseContextSnapshotSwitch. This is passed from browser
  to renderer if kUseContextSnapshot is enabled. A separate switch is
  used as at the time the v8 snapshot is loaded features have not been
  loaded.
And this updates a bunch of build targets accordingly.

BUG=1257321
TEST=none

Change-Id: I225a9235ac00e1c25ceaf0423587a00a1aafc740
2021-12-07 14:45:56 -05:00
Mario Sanchez Prada ea51998a54 Fix missing Brave product URLs from brave://about
The following URLs were missing from the list in brave://about:

  * brave://adblock
  * brave://ipfs-internals
  * brave://rewards
  * brave://rewards-internals
  * brave://tor-internals
  * brave://wallet
  * brave://welcome

...because the constant used to inject that list into kChromeHostURLs
is no longer there, so we need to pick a new "anchor" now.

Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/188f97443d21b20a33e6cad3ab8179dee24e62c8

commit 188f97443d21b20a33e6cad3ab8179dee24e62c8
Author: Adrienne Walker <enne@chromium.org>
Date:   Wed Oct 27 10:20:48 2021 +0000

    appcache: remove internals ui hookup

    This removes the chrome://appcache-internals url.  The code
    that backs this will be removed in a followup.

    Bug: 582750
2021-12-07 14:45:55 -05:00
Mario Sanchez Prada 5e676a67bc Replaced preprocessor define with constant in anonymous namespace
The `#define StandardReferralCodeLen 6` in the chromium_src override
for mini_installer.h is only used from mini_installer.cc, so we can
simply replace it with a constant private to that translation unit.
2021-12-07 14:45:54 -05:00
Mario Sanchez Prada 52d592732b Fixed paths for overriden t_p/b/r/c/loader/subresource_redirect_util.*
They need one ../ more
2021-12-07 14:45:54 -05:00
Mario Sanchez Prada 5a808e3c60 Removed chromium_src override for client_side_model_loader.cc
This override does no longer make sense, so we can drop it.

Chromium change:

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

commit c162640e5196c2e230262ce1062f262a5b61ef21
Author: Daniel Rubery <drubery@chromium.org>
Date:   Wed Oct 13 15:02:01 2021 +0000

    Remove client_side_model_loader.cc

    This CL removes a file missed by the previous cleanup, as well as
    marking a histogram from that file obsolete.

    Fixed: 1252857, 1258690
2021-12-07 14:45:53 -05:00
mkarolin 05962168eb Removed no longer needed patch for .vpython3
This was an upstream patch that now made it to cr97.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/f077b2ff2c8ed4b1772f04fcdff67abd74d47c17

commit f077b2ff2c8ed4b1772f04fcdff67abd74d47c17
Author: Brian Ryner <bryner@google.com>
Date:   Thu Oct 14 21:15:11 2021 +0000

    Use a newer version of numpy on mac-arm64.

    Older versions of numpy do not build for arm64. Sadly, the newer
    version does not work on very old (but supported) versions of macOS,
    so keep using the old version for all other platforms.

    Bug: 1235841
2021-12-07 14:45:52 -05:00
Mario Sanchez Prada 7eb2200b6a Adapt to changed return type for RunFunctionAndReturnSingleResult()
Chromium change:

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

commit ea58b457dd75daeeba5911a5b32b2cef7a5ed3c9
Author: Istiaque Ahmed <lazyboy@chromium.org>
Date:   Wed Nov 3 17:33:47 2021 +0000

    [Extensions] RunFunctionAndReturnSingleResult returns owned result.

    This CL makes
    extension_function_test_utils::RunFunctionAndReturnSingleResult return
    std::unique_ptr instead of unowned base::Value*. This will make the
    "result" to never leak.

    Bug: 1263370
2021-12-07 14:45:51 -05:00
Aleksey Khoroshilov 43ba430268 Redo BroadcastChannel partitioning using channel name altering approach.
Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/61e816d489f1f574b609435922de3a48334c7b8d

commit 61e816d489f1f574b609435922de3a48334c7b8d
Author: Andrew Williams <awillia@google.com>
Date:   Mon Nov 1 04:41:04 2021 +0000

    BroadcastChannel: Partition using StorageKey instead of Origin

    This CL updates the BroadcastChannel implementation so that partitioning
    is done by StorageKey instead of Origin. To facilitate this, it also
    changes the way in which Mojo messages are sent to preserve per-thread
    message ordering (as required by the BroadcastChannel specification).

    Previously, a shared, per-thread Remote was used to send messages from
    the renderer to RenderProcessHost on the browser side. This message would
    contain the origin, which the browser code would verify was accurate, and
    would then be used to establish the channel connection. This approach
    presents a challenge when switching to StorageKey, in that there's not a
    way to have the renderer send the StorageKey and have the browser verify
    it at the process level.

    This CL removes the origin from the message definition and replaces the
    RenderProcessHost handler (BroadcastChannelProvider instance) with
    separate ones for RenderFrameHostImpl, DedicatedWorkerHost,
    SharedWorkerHost, and ServiceWorkerHost instances. These new handles
    associate incoming connection attempts with their StorageKeys, allowing
    partitioning to be done without any information directly provided by the
    renderer. Shared per-thread Remotes are still used for workers to send
    messages to their corresponding host instance's BroadcastChannelProvider,
    and for frames a channel-associated interface is used to ensure that
    renderer messages are received in-order by the corresponding
    RenderFrameHostImpl.

    For more details, see the "Partitioned BroadcastChannel Design" document:

    https://docs.google.com/document/d/1CchMLU8QmDEx_tA0y57qLyQWvaTT3dlWF-4P_ncc06E/edit?usp=sharing

    Bug: 1239274
2021-12-07 14:45:50 -05:00
Mario Sanchez Prada fa39c93443 Migrate to using PermissionRequestManager::Dismiss() (vs PRM::Closing)
Chromium change:

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

commit a97d6c673eb5b1d3a890c4eacd8410283994b022
Author: Illia Klimov <elklm@google.com>
Date:   Thu Nov 4 20:47:43 2021 +0000

    Reland "Reland "Increase chip's tracking granularity.""

    This reverts commit d083a26e72a92f97d730de7bdeb93fe948cfca49.

    Reason for revert: Flaky tests will be reimplemented as Interactive tests.

    Original change's description:
    > Revert "Reland "Increase chip's tracking granularity.""
    >
    > This reverts commit fcd7314e5829a5f21ea1bfbedac09b0ef0c3c3f9.
    >
    > Reason for revert: Still causing test failures. See e.g.:
    >
    > https://ci.chromium.org/ui/p/chromium/builders/ci/linux-lacros-tester-rel/16549/
    >
    > Original change's description:
    > > Reland "Increase chip's tracking granularity."
    > >
    > > This reverts commit 85ad368ad03349967f9db54051f472be0d395ec7.
    > >
    > > Reason for revert: Fixing test and relanding the commit.
    > >
    > > Original change's description:
    > > > Revert "Increase chip's tracking granularity."
    > > >
    > > > This reverts commit ca6287b7032c1b19620fadf88fe4389ae21026f1.
    > > >
    > > > Reason for revert: <Suspect causing test failures - https://ci.chromium.org/ui/p/chrome/builders/ci/linux-chromeos-chrome/18173/overview>
    > > >
    > > > Original change's description:
    > > > > Increase chip's tracking granularity.
    > > > >
    > > > > This CL adds more granular tracking for users' actions with Chip. That
    > > > > allows differentiating what kind of a chip was shown, and what
    > > > > permission prompt's buttons the user clicked.
    > > > >
    > > > > Bug: 1253842
    > > > > Change-Id: I0a5f0e478947980b3cd688181492008853c77af1
    > > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3202091
    > > > > Reviewed-by: Ravjit Singh Uppal <ravjit@chromium.org>
    > > > > Reviewed-by: Collin Baker <collinbaker@chromium.org>
    > > > > Commit-Queue: Illia Klimov <elklm@google.com>
    > > > > Cr-Commit-Position: refs/heads/main@{#933822}
    > > >
    > > > Bug: 1253842
    > > > Change-Id: Icc39a900bdefe20da36ef827eb7dc21803123998
    > > > No-Presubmit: true
    > > > No-Tree-Checks: true
    > > > No-Try: true
    > > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3237450
    > > > Auto-Submit: David Bienvenu <davidbienvenu@google.com>
    > > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > > > Commit-Queue: David Bienvenu <davidbienvenu@google.com>
    > > > Reviewed-by: Samuel Huang <huangs@chromium.org>
    > > > Owners-Override: David Bienvenu <davidbienvenu@google.com>
    > > > Cr-Commit-Position: refs/heads/main@{#933922}
    > >
    > > Bug: 1253842
    > > Change-Id: I8286eaebf5a7d9e0c1705a3b5f95a1d6bf4a1493
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3241323
    > > Reviewed-by: Balazs Engedy <engedy@chromium.org>
    > > Reviewed-by: Ravjit Singh Uppal <ravjit@chromium.org>
    > > Reviewed-by: Collin Baker <collinbaker@chromium.org>
    > > Commit-Queue: Illia Klimov <elklm@google.com>
    > > Cr-Commit-Position: refs/heads/main@{#934712}
    >
    > Bug: 1253842
    > Change-Id: I6b470b638b99a0aa9f0bba60b6d39e6b19e12a55
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3245332
    > Auto-Submit: Rune Lillesveen <futhark@chromium.org>
    > Owners-Override: Rune Lillesveen <futhark@google.com>
    > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Cr-Commit-Position: refs/heads/main@{#934872}

    Bug: 1253842
2021-12-07 14:45:50 -05:00
Mario Sanchez Prada 71c6cd3283 Adapt to removal of parameters from RegisterComponentsForUpdate()
Chromium change:

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

commit f28af265fea678a12de47233836c2d08fab3641c
Author: Nicolas Dossou-Gbete <dgn@chromium.org>
Date:   Thu Nov 4 13:36:41 2021 +0000

    Make component updater registration stop depending on a profile

    The only dependency was due to cleanup code for the flash plugin's local
    artifacts. That cleanup has been shipped for more than a year (see
    https://crbug.com/1069814), so can now be removed.

    With that done, we can simplify the registration to make it more
    explicit that the component updater registration does need a profile
    anymore.

    Bug: 1069814, 1150326
2021-12-07 14:45:49 -05:00
Mario Sanchez Prada b38225f77d Remove override for BraveTabStrip::ShouldHideCloseButtonForTab()
The TabStrip::ShouldHideCloseButtonForTab() method has been removed
upstream. To preserve the behavior to show close button on inactive tabs
only on hover added an additional chromium_src override to tab.cc

Chromium change:

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

commit bc1aac74a88ad9ce554f048b6404b9e72383c832
Author: Taylor Bergquist <tbergquist@chromium.org>
Date:   Thu Nov 4 21:40:49 2021 +0000

    Remove stacked tabs from the rest of TabStrip.

    Bug: 1250061
2021-12-07 14:45:48 -05:00
mkarolin a4dab30c39 Updated strings for Chromium 97.0.4692.8. 2021-12-07 14:45:46 -05:00