Commit Graph
967 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
Pete Miller 7c368e211b Merge pull request #11847 from brave/ntp-widget-done-visibility-migration
New Tab Page WebUI - remove widget visibility migration
2022-01-14 22:01:25 -08:00
Pete Miller 67a9388252 New Tab Page WebUI - remove widget visibility migration and set the initial pref value to false
This should have no effect since all (or most) existing users would be migrated with the last 2 major releases and now only new users would be affected
2022-01-14 16:45:27 -08:00
Simon Hong 1804734ee1 Updated widevine permission bubble
fix https://github.com/brave/brave-browser/issues/9907

Permission bubble for widevine has custom footnote style.
2022-01-15 08:49:09 +09:00
Simon Hong 474c6d5dd6 Added side-panel webui to bookmarks api's allow list
fix https://github.com/brave/brave-browser/issues/20400
2022-01-12 12:09:53 +09:00
Taher f6c349705b Added shields panel webui 2021-12-16 14:40:03 -08:00
Aleksey Khoroshilov ba3a830148 Remove not needed COMPONENT_EXPORT usage. 2021-12-13 15:14:54 +07:00
Pete Miller b5de08f293 Remove incorrectly placed COMPONENT_EXPORT macro 2021-12-10 11:33:55 -08:00
Pete Miller 69748175a9 Desktop: Introduce feature flag "tab-audio-icon-interactive"
Controls whether tab audio icon can be interacted with to mute or unmute the tab
2021-12-07 21:39:05 -08:00
Emerick Rogul 9f20a77330 Fix DCHECK in brave://settings page due to getAdsData definition 2021-11-29 12:04:35 -05:00
Simon Hong 5b02b59110 Migrate crypto widgets visibility in NTP (#11266)
* Migrate crypto widgets visibility in NTP

fix https://github.com/brave/brave-browser/issues/19708

Migration is done once in the first NTP loading.

For new users, all crypto widgets are hidden by default.
For existing users, if current foremost widget is crypto widget,
only it is visible and others are hidden.
And, authed widgets are visible regardless of its position in widget stack
After migration, user can control crypto widget's visibility from gallery.

To make all crypto widgets hidden by default, each pref's default
value is not changed. Their default prefs is still "true".
As their visibility are managed by prefs and widget order is managed in local
storage, it's difficult to start migration from c++. If default is changed
to false, it's very difficult to determine whether foremost widget is crypto
or not in the NTP webui.
2021-11-25 13:43:57 +09:00
Emerick Rogul 2f2d9a0ab0 Fix state-level ad targeting shown for non-US region 2021-11-24 15:46:51 -05:00
Emerick Rogul 079dd01b2f Hide auto-contribute section in brave://settings when region is JP 2021-11-15 15:21:26 -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
Sergey c1777c6297 Import Trezor accounts (#10681)
Import Trezor accounts
2021-11-05 17:47:29 +03:00
Brian R. Bondy c04fe1b7ff Update cpp/.h build flags for wallet 2021-11-03 10:34:27 -04:00
Brian R. Bondy 6a232513e7 Remove wallet buildtime flag brave_wallet_enabled 2021-11-03 10:34:23 -04:00
Emerick Rogul 4532a325c3 Add Rewards settings to brave://settings 2021-10-28 08:01:31 -04:00
Brian R. Bondy 788395e35f Make window.ethereum non-writable when explicitly specified 2021-10-26 11:00:16 -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 8fcdedaef3 No more need to expose a special API for MM
They don't appaer to have ever used it anyway
2021-10-26 11:00:16 -04:00
Mikhail 293c56995e Enable internal translate engine (#10453)
* Move the buildflags

* Remove dummy TranslateURLFetcher

* Add runtime switching between extension and brave-translate-go

* Fix buildflags in network redirects

* Update patches

* Change translate-security-origin

* Fix lint

* Fix deps

* More lint

* Remove network redirection code

* Fix formatting

* Adjust CSP policy

* Use js requests redirection

* Adjust DEPS

* Fix !enable_extensions platforms

* Fix comment

* Improve js redirections, cleanup, fix tests

* Change a function name

* Remove NOLINT

* Remove logs

* Review fixes

* Remove C++ translate network redirections completely

* More review fixes

* Add browsertests

* Fix footers

* Add comments

* Fix test

* Remove the icon

* Use base::MockCallback

* Fix lint

* Improve the test

* Fix comments

* Move code to common

* Add a test switch for the google endpoint

* Update urls and add a switch
2021-10-20 20:26:52 +07:00
zenparsing 40256160fc Update new tab page rewards widget 2021-10-12 10:21:11 -04:00
Emerick Rogul 715a69a9ca Remove DDG search toggle from private tabs 2021-10-08 10:51:43 -04:00
Max 90ba094d9f Merge pull request #9934 from brave/cr95
Upgrade from Chromium 94 to Chromium 95
2021-10-05 21:19:56 -04:00
Simon Hong c4e9270a1e Added web discovery dialog
fix https://github.com/brave/brave-browser/issues/18488

Launched dialog for 3rd, 10th and 20th visits for brave search page
when user doesn't enable web discovery option yet or doesn't check
don't ask checkbox before.
2021-10-06 08:16:39 +09:00
Mario Sanchez Prada e8f982e491 Adapt ui::SCALE_FACTOR_* references to ui::k___Percent and kScaleFactorNone
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/15732bc9433284dbd63d66f1fa3bb0505dd74f75

commit 15732bc9433284dbd63d66f1fa3bb0505dd74f75
Author: Mitsuru Oshima <oshima@chromium.org>
Date:   Mon Aug 16 22:59:31 2021 +0000

    Rename scale_factor.h -> resource_scale_factor.h

    Rename enum elements to kXxxPercent and kScaleFactorNone

    Bug: 1217405
2021-10-05 16:19:42 -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
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
Pranjal Jumde f69b13e707 Merge pull request #9933 from brave/component_updater_refactor
Fix #17462: Refactor component-updater URL overwrites
2021-09-28 07:55:23 -07:00
Pranjal Jumde b3802c6d3b Fix #17462 - Refactor component-updater URL overwrites 2021-09-27 16:39:19 -05:00
Brian R. Bondy 7349ac8da8 Ensure provider object opens at most 1 tab 2021-09-27 15:49:43 -04:00
Kevin Kuehler 802c9789aa Merge pull request #10229 from brave/wdp_settings_text
Update WDP settings with most recent text
2021-09-23 20:56:04 -07:00
Kevin Kuehler 5adbf60d5d Update WDP settings with most recent text and url
Resolves https://github.com/brave/brave-browser/issues/18316
2021-09-23 09:53:06 -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
Kevin Kuehler 5991191246 Add BUILDFLAG guards for web discovery prefs 2021-09-21 22:14:00 -07:00
Kevin Kuehler e5a1c2c636 Include WDP bundles in the brave extension 2021-09-21 22:13:55 -07: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 4a75322a08 Changed prefs to kDontAskForCrashReporting to prevent double negative 2021-09-15 11:50:49 +09:00
Simon Hong 2d94955a90 Added don't ask checkbox to crash report permission ask dialog
fix https://github.com/brave/brave-browser/issues/18103

User will not see this dialog anymore after checking this checkbox.
2021-09-15 11:50:49 +09:00
Max Karolinskiy 2101f7f118 Revert "Merge pull request #9849 from brave/cr93_first_run_regression"
This reverts commit 0b78f9e1fc, reversing
changes made to d260b6aa38.

Reverting because upstream has fixed the first run regression via:

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

Cherry-picked into cr94 as
https://chromium.googlesource.com/chromium/src/+/3f20e2edeb0adf78a6a9a6208e2e02ad3c7d8810

commit f9385e0d893916cbb16b477bdec127e56f9897da
Author: Caitlin Fischer <caitlinfischer@google.com>
Date:   Mon Aug 30 13:31:02 2021 +0000

    Ignore Local State when deciding whether to show the first run dialog.

    The bug was caused by an experiment that causes Local State to be
    written to disk during startup (before the first-run-dialog-showing
    logic is reached) on some clients. Since Local State existed on some
    clients, the dialog was not shown. However, the first-run-dialog-showing
    logic should not depend on the presence or absence of a Local State
    file.

    This change affects some POSIX platforms running Google Chrome for the
    first time. This logic being removed was originally added here:
    https://chromiumcodereview.appspot.com/14946003/.

    Bug: 1221483
2021-09-13 14:53:58 -04:00
Mario Sanchez Prada 562f6486a1 Migrate usages of ui::ScaleFactor to ui::ResourceScaleFactor
Chromium change:

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

commit bc51d5e6bf8a72ab8208cfb7e80f3c1941fddc40
Author: Mitsuru Oshima <oshima@chromium.org>
Date:   Mon Jul 26 23:19:22 2021 +0000

    Rename ScaleFactor to ResourceScaleFactor (last patch)

    * ui::ScaleFactor -> ui::ResourceScaleFactor in chrome/browser
    * Rename ResourceBundle::GetMaxScaleFactor ->
             ResourceBundle::GetMaxResourceScaleFactor
    * Remove old enum and functions

    Bug: 1217405
2021-09-13 14:53:07 -04:00
mkarolin 05c6b573a9 Value->DictItems in range-based for loops shouldn't bind to reference.
Chromium change:

https://bugs.chromium.org/p/chromium/issues/detail?id=1223264

https://chromium.googlesource.com/chromium/src/+/7c683fe7de2aaff98f1ac8f0c2a24d2a44635499

commit 7c683fe7de2aaff98f1ac8f0c2a24d2a44635499
Author: Peter Kasting <pkasting@chromium.org>
Date:   Thu Jun 24 15:12:10 2021 +0000

    Fix -Wloop-analysis warnings in chrome/.

    These indicate when a range-based for loop is using an index whose type
    (value, pointer, or reference) doesn't match what the loop actually
    extracts from the range.  Fix by matching the actual type better.

    This shouldn't cause any behavior/performance change, just be slightly
    clearer about what's actually happening when reading the code.

    Bug: 1223264
2021-09-13 14:52:57 -04:00
Brian Clifton 74e539c294 Merge pull request #10028 from brave/bsc-fix-search-layer-violation
Fix layering violation - component including common
2021-09-10 00:11:32 -07:00
Brian Clifton cefc3e2003 Fix layering violation - component including common
Fixes https://github.com/brave/brave-browser/issues/17975
2021-09-09 16:27:28 -07: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
Anton Lazarev 5d5c4cd2f7 Merge pull request #9995 from brave/remove-cosmetic-filtering-extension-version
Remove cosmetic filtering extension version
2021-09-08 10:55:32 -07:00