Commit Graph
246 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
Kyle Hickinson 2a916733e4 [iOS] Add support for passing additional command line args at launch
Also adds support for passing in command line arguments provided at debug time
2022-01-21 18:37:22 -05:00
Brandon T c28b4ef645 Fix scheme format. 2022-01-19 20:35:30 -05:00
Kyle Hickinson c1a058dc86 Add exposed API to create a BraveWalletProvider 2022-01-18 10:44:55 -05:00
Kyle Hickinson 2d46a56c3c Add BraveWalletProvider delegate bridge 2022-01-18 10:44:55 -05:00
Kyle Hickinson 25134162d4 Support generating Obj-C wrapper for BraveWalletProvider on iOS 2022-01-18 10:44:55 -05:00
Brandon T babbd4e84e Formatting 2022-01-17 11:06:56 -05:00
Brandon T 7d80f42a7b Addressed feedback 2022-01-17 11:06:56 -05:00
Brandon T 327bf41a4b Added custom url schemes to Brave-Core and exported interface to Brave-Core browser & WebView. 2022-01-17 11:06:56 -05:00
Brian Clifton 45486c613b Fixes found as CI ran
- Fix for Android (VPN enabled flag check)
- Fix for iOS (include file was renamed)
- lint fixes
- initialize SKU feature for VPN tests
2022-01-15 00:18:52 -07:00
Brian Clifton ab7c90ca32 More review feedback updates:
- renaming PageController => JSHandler
- fixing guard usage (leaving TODOs where work required)
- pref_names split into 2 files
- BraveVpnServiceDesktop now gets passed pending remote and binds
- SKU mojom ref in VPN (desktop) will now rebind if connection broken
- Updated comments (documentation)
- Fixed callback usage in SkusServiceImpl
- Fixed gn_check violations
- Default SKU feature to true on iOS
- Have a common preferences registration (avoid iOS duplicating)
2022-01-13 23:20:56 -07:00
Kyle Hickinson 8c788f0055 iOS fix rollup
- Fixup iOS naming to match renamed service
- Fixup! Missed iOS changes that didn't get commited
- Fixup iOS build and switch factory to use mojo PendingRemote
- Fixup iOS headers and correct Swift name for SkusServiceFactory
- Fixup iOS factory to check nullability of GetServiceForBrowserState
- Fixup iOS factory name
2022-01-13 23:20:56 -07:00
Brian Clifton 9d896aaa5d SimpleURLLoader updates, renaming, and lint fixes
- Update SimpleURLLoader response to pass thru error code and properly handle body
- Update SimpleURLLoader to use `DownloadToStringOfUnboundedSizeUntilCrashAndDie`
  instead of expecting an arbitrary response size
- Renaming and lint fixes
2022-01-13 23:20:56 -07:00
Pete Miller 3aa27059a8 Fixes required after Chromium 97 upgrade 2022-01-13 23:20:56 -07:00
Kyle Hickinson b7ab083f94 Fixup iOS factories and correct cxxbridge header generation 2022-01-13 23:20:56 -07:00
Kyle Hickinson 01fcf181e2 Add iOS skus service factory and mojom wrappers 2022-01-13 23:20:54 -07:00
bridiver 2281c95d3f macOS and iOS rust build fixes
- fix macos static linking errors
- add missing macos guard
- strip unused symbols from the rust lib so we can use lld
- more ios and mac rust build fixes
2022-01-13 23:20:54 -07:00
Brian R. Bondy 78314b9bca Lint fixes for token rename 2022-01-07 16:57:32 -05:00
Brian R. Bondy 7de0620a5b ERCTokenRegistry BlockchainRegistry
ERCTokenRegistry -> BlockchainRegistry
ercTokenRegistry -> blockchainRegistry
ERC_TOKEN_REGISTRY -> BLOCKCHAIN_REGISTRY
ErcTokenRegistry -> BlockchainRegistry
erc_token_registry -> blockchain_registry
erc_token_images_source -> blockchain_images_source
ERCTokenImagesSource -> BlockchainImagesSource
ERC_TOKEN_IMAGES_SOURCE -> BLOCKCHAIN_IMAGES_SOURCE
erc_token_list_parser -> blockchain_token_list_parser
ERC_TOKEN_LIST_PARSER -> BLOCKCHAIN_TOKEN_LIST_PARSER
2022-01-07 15:35:24 -05:00
Brian R. Bondy 51e38c31ff Refactor Reset to be under BraveWalletService 2022-01-06 12:56:07 -05:00
Kyle Hickinson 3eaf7732d2 Updates iOS wallet factories to return mojo::PendingRemote
This replaces the concrete classes and binds them to the new `*MojoImpl` wrapper Obj-C classes
2022-01-05 16:00:39 -05:00
Kyle Hickinson 30ebd13d3f Support passing in a PendingRemote to mojo generated Obj-C wrappers 2022-01-05 16:00:39 -05:00
Jocelyn Liu 3f4b909ff1 format fixes 2022-01-04 15:20:03 -08:00
Jocelyn Liu 6f08e9dcbd s/GetControllerForBrowserState/GetServiceForState 2022-01-04 15:20:03 -08:00
Jocelyn Liu cfaa671f03 Rename EthJsonRpcController to JsonRpcService 2022-01-04 15:19:30 -08:00
Jocelyn Liu 7be8815fb8 Rename KeyringController to KeyringService 2022-01-04 15:09:59 -08:00
Jocelyn Liu a4e92f532a Rename EthTxController/EthTxControllerObserver to EthTxService/EthTxServiceObserver 2022-01-04 15:07:50 -08:00
Jocelyn Liu b6336ea4a2 Rename SwapController to SwapService 2022-01-04 15:07:50 -08:00
Jocelyn Liu bd68d5b6ec Rename AssetRatioController to AssetRatioService 2022-01-04 15:07:50 -08:00
Terry Mancey 8f3b60cb87 Fix Brave Ads save and dislike filters 2021-12-29 00:19:46 +00:00
Terry Mancey 0fdac30df5 Calculate account statement from locally persisted state 2021-12-08 15:48:18 -05:00
Max Karolinskiy 9dc192756d [iOS] FieldTrials API changes.
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/372dd5631b101af55b8b6df7f504c7488ba4b6f7

commit 372dd5631b101af55b8b6df7f504c7488ba4b6f7
Author: Caitlin Fischer <caitlinfischer@google.com>
Date:   Mon Oct 18 20:19:31 2021 +0000

    Replace Setup with SetUp in a couple functions.

    * SetUpFieldTrials
    * SetUpFeatureControllingFieldTrials

    The letter U should be capitalized since 'set up' is two words in this
    context.
2021-12-07 14:45:30 -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
mkarolin 50f7d5587b Task-related files moved from base/ to base/task/
Chromium change:

https://chromium.googlesource.com/chromium/src/+/39810e70da06baca176c0cdbc93164be1f980f59

commit 39810e70da06baca176c0cdbc93164be1f980f59
Author: Patrick Monette <pmonette@chromium.org>
Date:   Thu Oct 14 18:06:59 2021 +0000

    Reland "Move task-related files from base/ to base/task/"

    This is a reland of 092c30c5fd4def5a0c63d6f3a8953bd07768dd44

    The 2 problematic subrepos have been migrated and a couple late
    addition of the old headers were migrated.

    Original change's description:
    > Move task-related files from base/ to base/task/
    >
    > The forward headers are updated to point to the new location, and the
    > header guards were fixed.
    >
    > Bug: 1255932
2021-12-07 14:45:00 -05:00
Terry Mancey 455d366f21 Refactor unblinded tokens 2021-12-03 16:40:40 -05:00
Brandon T 786b78fdbb Export function to convert code-words into hex and vice-versa.
Fixed comma operator misuse.
2021-11-20 10:22:09 -05:00
mkarolin ff0916a409 [iOS] VariationService::SetupFieldTrials signature change.
Chromium change:

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

commit fee67eecab685e91b34ca9587a976257a56e4455
Author: Caitlin Fischer <caitlinfischer@google.com>
Date:   Thu Sep 23 20:01:00 2021 +0000

    Move the call to FieldTrialList::EnableBenchmarking() earlier.

    This call is being moved from VariationsFieldTrialCreator
    ::SetupFieldTrials() to MetricsStateManager::InstantiateFieldTrialList()
    because EnableBenchmarking should be called as soon as the list exists.

    This is because when benchmarking is enabled, field trials default
    groups are chosen. The situation in which the list is instantiated,
    a field trial is then set up and used, and benchmarking is later enabled
    should be avoided.

    This change also does the following:
    - Removes SetupFieldTrials' kEnableFeatures and kDisableFeatures params.
    The call sites all appear to be using the switches in base/switches.h
    although this wasn't always the case, e.g. on iOS, crrev.com/c/773080.
    - Improves some FieldTrial API comments.
    - Updates ShellContentBrowserClient::SetUpFieldTrials(), which is for
    testing only. The order in this function now matches what most
    platforms do: (1) create the MetricsStateManager, (2) call
    InstantiateFieldTrialList(), and (3) set up field trials.

    Bug: 1246410, 1251484
2021-11-02 12:38:04 -04:00
mkarolin 9a9d73f92e [iOS] MetricsServicesManager API change.
Chromium change:

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

commit b1d0f28aa93e62bc81959e0b62158c800a46b85d
Author: Caitlin Fischer <caitlinfischer@google.com>
Date:   Fri Sep 17 04:54:04 2021 +0000

    Perform CleanExitBeacon init steps after creating the FieldTrialList.

    The motivation behind this change and crrev.com/c/3160866 is being able
    to assign clients to experiment groups when the CleanExitBeacon init
    steps occur, as in crrev.com/c/3120545.

    Bug: 1246410
2021-11-02 12:38:04 -04:00
Kyle Hickinson 5064aa1955 Move iOS Brave browser state factories out of chromium_src override 2021-10-27 13:21:27 -04:00
Anirudha Bose 8731525708 Merge pull request #10410 from brave/swap_hide_internals
Hides internal values for swap inside swap_controller
2021-10-09 08:52:33 +05:30
Serg 431952fff4 Fixes ios build 2021-10-08 08:04:38 -04:00
Anthony Tseng 17d824d773 Decouple KeyringControler from BraveWalletServiceDelegateImpl 2021-10-07 14:00:03 -07:00
Max Karolinskiy accd436f02 [iOS] Synced up brave_providers build target with upstream chromium_providers II. 2021-10-05 16:20:15 -04:00
Max Karolinskiy ad97b994b9 [iOS] Synced up brave_providers build target with upstream chromium_providers 2021-10-05 16:20:08 -04: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
Jocelyn Liu 066996fd48 Fix iOS build 2021-10-01 16:51:53 -07:00
Kyle Hickinson 1781248de8 Add ability to fetch Brave Wallet component file path for images/logos 2021-10-01 17:01:46 -04:00
Kyle Hickinson 8c4d4648a1 Merge pull request #10295 from brave/ios-component-updater
Add support for component updater on iOS
2021-09-29 00:42:28 -04:00
Brian R. Bondy 51b44af2e1 Rename BraveWalletImporterDelegate to BraveWalletServiceDelegate 2021-09-28 18:22:03 -04:00