Commit Graph
589 Commits
Author SHA1 Message Date
Mario Sanchez Prada bbf5fd3fe9 Remove deprecated DISALLOW_ macros from Brave-specific code
Macros such as DISALLOW_COPY_AND_ASSIGN() are deprecated since r711900
per style arbitration [1]. This commit replaces the macros with deleted
constructors and methods, which is preferred by the Google C++ Style
Guide [2][3].

Also remove unneeded "base/macros.h" #includes when possible.

This CL is created semi-mechanically with remove_disallow and
remove_base_macros [4].

[1]: https://groups.google.com/a/chromium.org/g/cxx/c/qwH2hxaEjac/m/TUKq6eqfCwAJ
[2]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#explicitly-declare-class-copyability_movability
[3]: https://google.github.io/styleguide/cppguide.html#Copyable_Movable_Types
[4]: https://pkg.go.dev/go.timothygu.me/tools/cr/cmd

Chromium change:

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

commit d002a3bee7ae75780b604d17df19291a3dd303fb
Author: Peter Boström <pbos@chromium.org>
Date:   Fri Nov 5 17:17:19 2021 +0000

    Remove DISALLOW_ macros from base/macros.h

    This removes DISALLOW_COPY(), DISALLOW_ASSIGN() and
    DISALLOW_COPY_AND_ASSIGN() from base/macros.h. PRESUBMITs are also
    updated to no longer check for these macros.

    IWYU removal is left as a separate change just in case this needs to be
    reverted.

    Bug: 1010217
2022-01-24 15:33:37 -05:00
Emerick Rogul 747ebb9213 Migrate kHideButton preference to kShowButton preference 2022-01-11 15:39:35 +00: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
Mario Sanchez Prada 6d7031c4ea Adapt to the removal of WebContents::GetAllFrames()
This change upstream was motivated by the work on MPArch, meaning
that we need to rely on the ForEachRenderFrameHost() methods now,
as well adapt tests where needed.

Chromium change:

https://github.com/chromium/chromium/commit/4e3a62323f0487be3ea815396281bc306c0445f6

commit 4e3a62323f0487be3ea815396281bc306c0445f6
Author: Dave Tapuska <dtapuska@chromium.org>
Date:   Wed Oct 27 16:14:02 2021 +0000

    Rewrite Extension url checking to use ForEachRenderFrameHost.

    Replace last usage of GetAllFrames with ForEachRenderFrameHost. The
    debugger API checks that each frame has may attach to the URL, change
    this to iterate all frames from the primary main frame.

    Remove deprecated API from WebContents.

    BUG=1208438
2021-12-07 14:45:41 -05:00
Mario Sanchez Prada e2251cf782 Migrate all calls to GURL::DeprecatedGetOriginAsURL()
This method will go away soon, so we get rid of Brave-specific
instances now to prepare for the future.

For now, this patch just makes sure we don't call the deprecated
method, but ideally we should probably make deeper changes not to
use a GURL as the type for origins, and use url::Origin instead.

Chromium change:

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

commit e439902e17bbd1f540f7dc7f6e3e153871c76b34
Author: Matt Menke <mmenke@chromium.org>
Date:   Thu Oct 21 18:04:42 2021 +0000

    Reporting: Remove use of GURL::DeprecatedGetOriginAsURL().

    In some places this was called only to eventually convert the result
    to an Origin.

    Also make reporting APIs that were taking a URL only to convert it to
    an origin take origins instead.

    Bug: 512374
2021-12-07 14:45:25 -05:00
mkarolin dca368662d GURL::GetOrigin() -> GURL::DeprecatedGetOriginAsURL()
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/800532c0bf6712ea4ab5928da9e776d6607a10b1

commit 800532c0bf6712ea4ab5928da9e776d6607a10b1
Author: Mike West <mkwst@chromium.org>
Date:   Thu Oct 14 09:26:52 2021 +0000

    Deprecate returning a GURL from GURL::GetOrigin().

    This patch renames `GURL::GetOrigin()` to
    `GURL::DeprecatedGetOriginAsURL()`. A subsequent patch will
    reintroduce a `GURL::GetOrigin()` that returns a `url::Origin`
    rather than a `GURL`.

    This patch was brought to you by sed, followed by a little manual
    work to deal with look-alike methods (most notably
    `CascadePriority::GetOrigin()` and `NudgeTracker::GetOrigin()`) and
    two or three spots that held pointers to GURLs:

    ```
    git grep -n -l ".GetOrigin(" | \
      xargs -L1 sed -i '' \
        -e 's/\.GetOrigin(/.DeprecatedGetOriginAsURL(/g'
    ```

    Bug: 512374
2021-12-07 14:45:02 -05:00
Emerick Rogul 2f2d9a0ab0 Fix state-level ad targeting shown for non-US region 2021-11-24 15:46:51 -05:00
Emerick Rogul 9f4fda7f8b Merge pull request #11014 from brave/rewards-brave-settings-hide-ac-when-bitflyer-active
Hide auto-contribute section in brave://settings when region is JP
2021-11-15 21:27:27 -05:00
Emerick Rogul 079dd01b2f Hide auto-contribute section in brave://settings when region is JP 2021-11-15 15:21:26 -05:00
Mark Pilgrim ee55d8600c Migrate contentSettingsAgent tests away from kIgnoreCertificateErrors 2021-11-15 12:11:37 -05:00
Pete Miller ce0c689973 Brave News: refactor to have API return card data and in intended display order, instead of a flat list of content
Previously, the front-end would decide on the order and type of card used for each feed item. Having the mojom API return that makes it easier to have the same decisions apply to desktop and android.
Also uses strong typings from mojom es module output. Works very well with Typescript.
Now that the mojom API is feature-complete, we can remove the extension API.
2021-11-08 15:49:23 -08:00
Brian R. Bondy fee3956d8d Add default currency/cryptocurrency settings and API 2021-11-04 15:57:03 -04:00
Brian R. Bondy 2a4d532d94 Merge pull request #10855 from brave/remove-crypto-wallets-for-new-installs
Remove Crypto Wallets default wallet option for new installs
2021-11-03 20:42:33 -04:00
Brian R. Bondy 646e2533bf Remove Crypto Wallets default wallet option for new installs
Unless a runtime flag is specified
2021-11-03 15:26:17 -04:00
Brian R. Bondy c04fe1b7ff Update cpp/.h build flags for wallet 2021-11-03 10:34:27 -04:00
Emerick Rogul 4532a325c3 Add Rewards settings to brave://settings 2021-10-28 08:01:31 -04:00
Brian R. Bondy 1da3221030 Remove old BitGo code which was never used 2021-10-26 11:00:16 -04:00
Brian R. Bondy 2e81ecfd3c Deprecate old default wallet migration
In the new way we will always pick BraveWalletPreferExtension unless it is None
2021-10-26 11:00:15 -04:00
Brian R. Bondy dab194d145 Rename Metamask constant to generic BraveWalletPreferExtension 2021-10-26 10:56:07 -04:00
Sergey P 6cf0961c24 Use page handlers instead of extenions api 2021-10-26 08:44:24 +03:00
Sergey P ad148db289 Added a list of custom chains to the wallet settings page 2021-10-26 08:44:24 +03:00
Brian R. Bondy 210b98e26b Add pref migration for default wallet 2021-10-20 10:14:51 -04:00
zenparsing 40256160fc Update new tab page rewards widget 2021-10-12 10:21:11 -04:00
mkarolin 3f06461c6d ui_test_utils::NavigateToURL is now WARN_UNUSED_RESULT
Chromium change:

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

commit fb432b1ad18bc0654844e147bf089237e97b6cd3
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Wed Sep 8 22:16:13 2021 +0000

    Mark ui_test_utils::NavigateToURL as WARN_UNUSED_RESULT.

    This is step 2 from https://crbug.com/1246568 - it adds
    WARN_UNUSED_RESULT annotation to ui_test_utils::NavigateToURL to ensure
    the callers verify if the navigation has succeeded.

    The CL has to add ASSERT_TRUE in a few places that have already started
    backsliding since https://crrev.com/c/3140783 and
    https://crrev.com/c/3149434.

    Bug: 1246568
2021-10-05 16:21:41 -04:00
Mario Sanchez Prada 506bf8239d Adapt to removal of ListValue::AppendString()
Use ListValue::Append() instead.

Chromium change:

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

commit d9b06a7f0a1d882457a22468f92512dc9b68c631
Author: Clark DuVall <cduvall@chromium.org>
Date:   Wed Sep 8 00:06:37 2021 +0000

    [Code Health] Remove ListValue::AppendString and ListValue::GetSize

    All uses of these have been removed.

    Bug: 1187102, 1187064
2021-10-05 16:21:40 -04:00
Mario Sanchez Prada 1884b27ccd Adapt to removal of ListValue::AppendInteger()
Just use ListValue::Append() now.

Chromium change:

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

commit f138b4dac9a98f7d21cffc042e48fe3061b075ac
Author: Clark DuVall <cduvall@chromium.org>
Date:   Wed Sep 1 18:07:05 2021 +0000

    [Code Health] Remove ListValue::Append(Integer|Boolean)

    This was an automated change done with a slightly modified copy of
    //tools/clang/value_cleanup.

    A small manual change was made to gin_java_method_invocation_helper.cc
    which required casting to use the correct Append() override.

    Bug: 1187102
2021-10-05 16:20:14 -04:00
Mario Sanchez Prada 86ea5a4a01 Use ExtensionFunction::args() instead of accessing its private members
Chromium change:

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

commit a6dba25659702847866ae636d6e334cb4096c4dc
Author: Alex Turner <alexmt@chromium.org>
Date:   Wed Aug 18 01:29:05 2021 +0000

    Move args_ to private in ExtensionFunction

    Following the change in crrev.com/c/3066527, ExtensionFunction now
    provides the protected methods has_args() and args(). We can therefore
    now make args_ private. This requires converting a large number of
    `Params::Create(*args_)` calls to `Params::Create(args())`.

    Bug: 1187062
2021-10-05 16:19:51 -04:00
Pranjal Jumde 01403f0fa0 Fix #18152: Cast should be disabled on toggling off media router switch in extension settings 2021-10-02 15:07:37 -05:00
aseren 5bdbb82c89 Merge pull request #9611 from brave/ads_enable_request_js_api
Ads enable request js api
2021-09-30 21:28:16 +07:00
Brian Clifton 864cbc06bb Merge pull request #10311 from brave/bsc-remove-brave-talk-feature
Remove Brave Talk feature flag (used on NTP)
2021-09-29 22:03:54 -07:00
Brian Clifton ecae2a0860 Remove Brave Talk feature flag (used on NTP)
Fixes https://github.com/brave/brave-browser/issues/18426
2021-09-29 22:03:18 -07:00
Aleksey Seren b899c8b1db Add braveRewards.requestAdsEnabledPopupClosed() extension function.
fix https://github.com/brave/brave-browser/issues/16964
2021-09-30 01:33:54 +07:00
Brian R. Bondy 30b9982d2c Add pref for controlling the auto lock timeout 2021-09-28 15:16:45 -04:00
Brian R. Bondy 34b94fbf78 Implement review comments for DefaultWallet changes 2021-09-24 19:53:51 -04:00
Brian R. Bondy 2f6371bd55 Simplify default wallet handling w/ GetDefaultWallet/SetDefaultWallet 2021-09-24 16:56:49 -04:00
Brian R. Bondy 77b854464b Change to mojom enum type for default wallet setting 2021-09-24 16:56:49 -04:00
Terry Mancey 023a4e9cc4 Merge pull request #10210 from brave/issues/10906
Refactor Brave Ads timestamps from uint64_t to double and base::Time
2021-09-24 12:18:32 -05:00
Terry Mancey 4d97477ecf Refactor Brave Ads timestamps from uint64_t to double and base::Time 2021-09-24 10:10:29 -05:00
Anthony Tseng 33c584f607 Rename and ETHEREUM_REMOTE_CLIENT_ENABLED guard 2021-09-23 13:43:24 -07:00
Brian R. Bondy 79fc9b30e6 Merge pull request #10191 from brave/default-wallet
Add new default wallet handling - deprecate Dapp detection and lazy load Crypto Wallets
2021-09-23 09:20:09 -04:00
Simon Hong 20cb62a807 Cached selected vpn region in prefs
fix https://github.com/brave/brave-browser/issues/18305

Selected VPN region data is stored as dict in prefs.
Moved existing kBraveVPNShowButton pref name to brave_vpn/pref_names to
manage vpn related prefs in one place.
2021-09-23 16:05:12 +09:00
Brian R. Bondy f4bffae6cf Remove promptToEnableWallet and related code 2021-09-22 16:03:53 -04:00
Brian R. Bondy 2c3ae103b8 Remove dapp detection and Ask option for default dapp setting 2021-09-22 16:03:53 -04:00
Brian R. Bondy 05b55a91a9 Remove Load Crypto Wallets on startup option
We do this now implicitly if Crypto Wallets is set to the Dapp provider
2021-09-22 16:03:53 -04:00
Kevin Kuehler 32d132df92 Merge pull request #9381 from brave/humanweb_bundled_extension
Include web discovery bundles in the brave extension
2021-09-22 12:06:24 -07:00
Kevin Kuehler e5a1c2c636 Include WDP bundles in the brave extension 2021-09-21 22:13:55 -07:00
Szilard Szaloki 402a7cb246 Merge pull request #10109 from brave/sszaloki-15543-make-tipping-panel-dependent-on-the-result-of-the-tipping-flow
Making the tipping panel dependent on the result of the tipping flow.
2021-09-21 20:04:17 +02:00
Szilard Szaloki 2124365d62 Making the tipping panel dependent on the result of the tipping flow. 2021-09-21 15:51:40 +02:00
Szilard Szaloki 58cd378ac6 Replacing 0.0 BAT in "Earnings from Ads" with a link to the user's custodian-specific transaction history page. 2021-09-20 22:48:57 +02:00
Simon Hong c226736287 Merge pull request #9998 from brave/brave_vpn_button_setting
Added show vpn button toggle option
2021-09-09 15:29:45 +09:00