49 Commits
Author SHA1 Message Date
Claudio DeSouza c164d6759c [cr145] IWYU for callback_helpers.h
This change does IWYU additions for all cases where `base::DoNothing` is
used. Furthermore, this change removes some of the uses of
`base::DoNothing` as an argument default value in a header, removing the
need to add `callback_helpers.h` to those headers.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e8436cccafc34d6e4d9c060f682345060579d208
https://chromium.googlesource.com/chromium/src/+/227f058d9b9e27370a64b34046d71b9f23106409

commit e8436cccafc34d6e4d9c060f682345060579d208
Author: Lei Zhang <thestig@chromium.org>
Date:   Fri Dec 12 15:16:22 2025 -0800

    Forward declare base::ScopedClosureRunner in some Blink headers

    Avoid including base/functional/callback_helpers.h when not needed. Also
    use base/functional/callback_forward.h since callback_helpers.h was
    providing callback.h. For scrollable_area.h, make this possible by
    getting rid the default arguments to PerformSnapping(),
    SnapAtCurrentPosition(), and SnapForEndPosition(). These methods have
    very few callers, so just pass in all the arguments. Then do IWYU to fix
    the build.

    Change-Id: I5cfd017bd6f392b0d97e99c41d4885fac7140a4c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7254408
    Commit-Queue: Philip Rogers <pdr@chromium.org>
    Auto-Submit: Lei Zhang <thestig@chromium.org>
    Reviewed-by: Philip Rogers <pdr@chromium.org>
    Reviewed-by: Christoph Schwering <schwering@google.com>
    Reviewed-by: Robert Flack <flackr@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1558318}

commit 227f058d9b9e27370a64b34046d71b9f23106409
Author: Lei Zhang <thestig@chromium.org>
Date:   Thu Dec 11 21:30:12 2025 -0800

    Do IWYU for callback_helpers.h in async_dom_storage_database.cc

    Add callback_helpers.h for base::DoNothing() usage. The transitive
    include that makes this work as-is will be deleted in the near future.

    Change-Id: Id5ba6db705434734a854874923b7bb196392ca6c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7253640
    Commit-Queue: Mingyu Lei <leimy@chromium.org>
    Auto-Submit: Lei Zhang <thestig@chromium.org>
    Reviewed-by: Mingyu Lei <leimy@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1557849}
2026-01-29 13:40:34 -05:00
Claudio DeSouza 983125594a [cr145] IWYU fixes. 2026-01-29 13:40:16 -05:00
cdesouza-chromium 919ab4bbf8 [IWYU] base/memory/ref_counted.h (#32164)
This PR has some machanical IWYU for `base/memory/ref_counted.h`.

Bug: https://github.com/brave/brave-browser/issues/42212
2025-11-05 00:28:20 +00:00
Aleksei Khoroshilov a41bf5350b Replace "src/" includes with <> in chromium_src. (#30096)
This change updates how brave/chromium_src overrides can reference original files: it adds ability to use #include <...> along with #include "src/...". This is enabled by replacing -I../../brave/chromium_src with -iquote../../brave_chromium_src, which adds an include search path only for #include "..." directives.

With this approach, other files in the build tree can reference brave/chromium_src overrides using #include "...", while the overrides themselves can reference original Chromium files using #include <...>. Since Chromium uses #include "..." for all in-tree files, we can leverage this convention and configure our overrides so that we can drop support for #include "src/" later by removing -I../../.. and making rbe_exec_root modification obsolete (the main goal).
2025-07-24 17:37:44 +07:00
cdesouza-chromium cb09ee9a5f [IWYU] Fixing logging inclusions pt.10 (#29530)
This change is one of many fixing inclusion for the following files:

    - `base/notimplemented.h`
    - `base/notreached.h`
    - `base/check.h`
    - `base/dcheck_is_on.h`
    - `base/check_deref.h`
    - `base/check_op.h`
    - `base/logging/log_severity.h`
    - `base/logging.h`

This change is a mechanical change done with the following script:
https://github.com/brave/brave-browser/issues/46707#issuecomment-2960116515

Resolves https://github.com/brave/brave-browser/issues/46707
2025-06-12 12:37:03 +01:00
Emerick Rogul 1d339d52c2 [cr138] Incorporate changes to CrxCache lifetime
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7eb44b05ca808d66b3324aa4ea3902becfa3b0e9

commit 7eb44b05ca808d66b3324aa4ea3902becfa3b0e9
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Tue May 6 08:51:18 2025 -0700

    Updater: Clear CrxCache entries belonging to unregistered apps.

    Additionally, proactively clear the qualification app from the cache
    after successful qualification.

    These changes required expanding the lifetime of the CrxCache from being
    scoped to the UpdateEngine to being scoped to the configurator's
    lifetime.

    Fixed: 407176851
2025-06-11 18:56:26 +01:00
cdesouza-chromium 818e361e27 [IWYU] Fixing <array> inclusions (#29515)
This PR corrects all inclusions for `<array>`. This is a mechanical
change. For details see:
https://github.com/brave/brave-browser/issues/46745#issuecomment-2962771172

Resolves https://github.com/brave/brave-browser/issues/46745
2025-06-11 17:37:12 +01:00
Max Karolinskiy 5381c26a25 [cr137][TEMP] Bypass component update download size check.
Download size is now a required attribute which our go updater currently
doesn't supply. Until the go updater gets fixed we can bypass the size
check.

Chromium change:

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

commit cf775224f2c9a85364d1632e1f57e1023fa1d320
Author: James Decker <deckerjames@google.com>
Date:   Fri Apr 11 13:09:51 2025 -0700

    Adding events for operation attribute errors.

    - adds events for the existing unsupported operations error handling.
    - adds checking for cases where expected attributes are either missing or do not match expectations (e.g. hash is empty, download size less than or equal to 0).
    - For the missing attributes, we just reuse the existing operation event types.
    - For unsupported operations, a new event was added to the protocol and implementation.
    - Added naive size checking to verify that the download size for a payload both exists, and is at a minimum greater than 0. If this is not the case, then a bug on the server could lead to downloading payloads past the disk space limit of "available_space / 2", causing disk space issues for the client machine.

    Note: kEventUnsupported should always have a failed result.

    other notable changes:
    - moved simple event creation to a shared location to reduce redundant code, and also give access to it from pipeline.cc
    - modified the disjoint "terminal" and "non_terminal" ping data lists in update client tests to instead be "terminal" and "all pings". This allows us to ignore the operation events when needed, while allowing us to still verify the full order of events in the cases where non-terminal events are relevant.

    Bug: 409566857
2025-05-13 15:53:29 -04:00
Claudio DeSouza 91197a450e [cr137] Ecdsa::Create removed
This class has now been spanified, which has dropped the use of the
factory function. This change corrects our use of this class too.

Chromium changes
https://chromium.googlesource.com/chromium/src/+/5a157ba810e66a8139990724edd941944955417a

commit 5a157ba810e66a8139990724edd941944955417a
Author: Elly <ellyjones@chromium.org>
Date:   Tue Apr 8 10:05:56 2025 -0700

    components/cup: migrate to new crypto APIs

    This change migrates //components/client_update_protocol from:
    * crypto/sha2 to crypto/hash
    * crypto/signature_verifier to crypto/sign and crypto/keypair

    Specifically:
    * Uses of the obsolete SHA-256 APIs are replaced with uses of the new
      crypto::hash API, generally resulting in less copying and intermediate
      variables
    * Use of SignatureVerifier is replaced with a single call to
      crypto::sign::Verify

    That causes a design change. Previously, the Ecdsa class relied on
    SignatureCreator, and creation of SignatureCreator could fail, so
    Ecdsa also had to have a constructor that could fail (its ::Create
    static method). Since construction of PublicKey *can't* fail unless the
    public key is malformed, and we know the public key in advance (it is
    hardcoded), Ecdsa no longer needs a fallible ::Create method. It is now
    possible to directly construct an Ecdsa instance and hold it inline.
    This change bubbles outwards to clients of Ecdsa, which now hold Ecdsa
    instances as class members directly rather than as unique_ptrs, and
    allows removing a bunch of conditions / failure paths from those client
    classes.

    Apart from that design change (which accounts for the bulk of the LOC in
    this CL), this CL:
    * Migrates some raw arrays to std::arrays, fixing unsafe bounds
      warnings;
    * Promotes some DCHECKs that indicate programmer errors to CHECKs in
      line with current guidance;
    * Removes some logic that decoded static public keys from hardcoded
      base64 strings at runtime in favor of hardcoding the raw key bytes
      instead, and removes some failure paths as a result;
    * Removes the MISSING_PUBLIC_KEY error code, since this is now
      impossible in RequestSender (the public key is hardcoded, and no
      longer needs fallible base64 decoding);
    * Adds assignment operators to crypto::keypair, which I forgot to do
      when originally adding them but which are needed for Ecdsa to allow
      replacing its internal keys for testing

    Bug: 372283556
2025-05-13 15:52:51 -04:00
Claudio DeSouza 9d1087b39d [cr136] ProtocolParser::Results::list renamed to apps
Nothing else affected functionally.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4a62c8159c92771582a453850e268eff50ac6176

commit 4a62c8159c92771582a453850e268eff50ac6176
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Fri Mar 14 06:52:53 2025 -0700

    update_client: Switch to protocol v4.

    Bug: 353249967
2025-04-16 09:30:26 +01:00
cdesouza-chromium b55418f7a3 Deleting all base::ranges uses (#27446)
All range implementations are now deleted in chromium and the std
implementation is to be used in its place.

This is a mechanical change.

```bash
function add_header {
  echo "Adding header $1"
  git diff --name-only \
    | xargs ../tools/add_header.py --header "$1"
  git grep -l "std::ranges" \
    | xargs ../tools/add_header.py --header "$1"
}

function remove_header {
  echo "Removing header $1"
  git diff --name-only \
    | xargs ../tools/add_header.py --header "$1" --remove
  git grep -l "$1" \
    | xargs ../tools/add_header.py --header "$1" --remove
}
```

Chromium change:
https://chromium.googlesource.com/chromium/src/+/3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f

commit 3b811ffd3cef9d11cda6812ac4d22dcfdbad7d0f
Author: Peter Kasting <pkasting@chromium.org>
Date:   Wed Jan 29 14:20:16 2025 -0800

    Remove base/ranges/.

    Bug: 386918226

Resolves https://github.com/brave/brave-browser/issues/43664
2025-02-01 16:05:11 +00:00
Claudio DeSouza cfb49795a8 [cr132] std::optional<ProtocolParser::Results> passed by value
This arg passing to make the semantics clearer, and avoid hidden copies.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/9085ad7f8069691579c17d5f2046ac4d61f9010d

commit 9085ad7f8069691579c17d5f2046ac4d61f9010d
Author: Sorin Jianu <sorin@chromium.org>
Date:   Wed Oct 16 21:57:32 2024 +0000

    update_client,updater,cus: take optional types by value

    https://abseil.io/tips/163

    Change-Id: Iad5543266f6135a18c4e7f4fe3a3c5060183b0d8
2024-11-29 13:24:48 +00:00
Claudio DeSouza 4aed2591b5 [update_client] Observers events simplified
This change does unifies the id/status pair data sent during `OnEvent`
under a single structure, which affects quite a few places where this
event is used.

Another place affected by these changes involves instantiating
`UpdateContext`, which doesn't require to pass along a
`notify_observers_callback` argument.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/2c20c79dfeff629b1867c5e0a8837149e8a5f668

commit 2c20c79dfeff629b1867c5e0a8837149e8a5f668
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Fri Sep 27 13:28:14 2024 +0000

    update_client: Simplify observer mechanisms.

    Prior to this CL, there were multiple observer mechanisms that used
    different types, but all of which mapped to the same underlying
    concepts. After this CL, there are still multiple mechanisms (depending
    on whether the observer wants their observations scoped to a single
    updater operation or whether they want to observe the updater as a
    whole), but the types are now consistent, and observers get a constref
    snapshot of the observed item.

    Bug: 353249967
2024-10-24 12:14:29 +01:00
Claudio DeSouza a01bc7ce4f Reanch UpdateClient substitution on Uninstall
The return value for `GetInstalledFile` has changed, which has broken
the override, as it relies on the substitution declaration to have the
same return type.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/4bc4563fa88f842b1fa05ee6ec28f80c26a48f6f

commit 4bc4563fa88f842b1fa05ee6ec28f80c26a48f6f
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Thu Sep 12 19:14:48 2024 +0000

    update_client: Simplify ActionRunner.

    Also eliminate the implementation of GetInstalledFile for the extension
    updater. The diff system no longer calls it and the only remaining
    caller is ActionRunner, which we don't need to support for extensions.

    Also add some checks against parent and absolute paths in the run
    command. (We don't need these and maybe it's unwise to have the client
    accept them from the server for insider risk reasons.)

    The original motivation of the CL was to continue to eliminate refs to
    Component (ActionRunner held a raw_ref.)

    Bug: 353249967
2024-10-03 17:06:29 +01:00
Claudio DeSouza dbc222dac1 PersistedData dropped around UpdateChecker
This only affects how certain instatiations were being done, as the
data itself was only getting passed along.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/eecda5d4d6f20fe6baba7f7c0eb0e02284a349f6

commit eecda5d4d6f20fe6baba7f7c0eb0e02284a349f6
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Wed Sep 11 13:48:38 2024 +0000

    update_client: Simplify ping_manager.

    Also remove a dependency from util on component.

    Also improve memory safety in request_sender.

    Bug: 353249967
2024-10-03 17:06:28 +01:00
Michael Herrmann e0cc3ba0e4 Control Omaha 4 on macOS with Griffin (#25190) 2024-09-11 19:37:15 +02:00
Michael Herrmann fb192a5adc Remove Widevine ARM64 DLL fix (#23415)
Upstream now offers the DLL from its public component update server.
2024-05-07 10:02:08 +09:00
goodov 24303f67d5 Support OnDemandUpdate with multiple components at once. (#23169)
* Support OnDemandUpdate with multiple components at once.

* Review fixes.

* Mark two missed components as Brave.
2024-05-03 20:53:32 +01:00
Michael Herrmann 19a55f6195 Create a first prototype of auto-updates with Omaha 4 on macOS (#22689)
This commit adds an implementation that replaces Sparkle by Omaha 4 for
on-demand updates. It is hidden behind a default-disabled GN arg and
is highly experimental: The user must manually install Omaha 4 by
executing a command. They must also manually create a JSON file that
tells Omaha that Brave is installed. Once they do that, the
implementation can update to a new version via brave://settings/help.
The associated "Brave was updated - relaunch?" button does not work.
2024-04-15 11:44:09 +02:00
Michael Herrmann 8cce5e926e Add BravePersistedDataTest (#22202) 2024-02-23 15:13:59 +01:00
Michael Herrmann 34e4e4f9ba Fix spurious crash on Arm64 Windows (#22199) 2024-02-21 08:31:46 +01:00
Michael Herrmann 6910123cd9 Fix build on Arm64 Windows (#22005) 2024-02-13 17:57:20 -05:00
cdesouza-chromium d1384a7872 [CodeHealth] Replace absl::optional with std::* (#21156)
This change replaces all uses of `absl::optional` with `std::*` variants
for optional. This is in line with upstream recent changes making
`absl::optional` a `typedef` to the `std` type.

This change has been done using an automated script:

    #!/bin/bash

    function replace {
      echo "Replacing $1 by $2"
      git grep -l "$1" \
        | cut -f1 -d: \
        | sort \
        | uniq \
        | grep \
          -e "\.h" \
          -e "\.cc" \
          -e "\.mm" \
          -e "\.py" \
        | xargs sed -i "s/$1/$2/g"
    }

    function delete_line_with {
      echo "Deleting lines with $1"
      git grep -l "$1" \
        | cut -f1 -d: \
        | sort \
        | uniq \
        | grep \
          -e "\.h" \
          -e "\.cc" \
          -e "\.mm" \
          -e "\.py" \
        | xargs sed -i "/$1/d"
    }

    function add_header {
      echo "Adding header $1"
      git diff --name-only HEAD \
        | xargs ../tools/add_header.py --header "$1"
    }

    replace "absl::make_optional" "std::make_optional"
    replace "absl::optional" "std::optional"
    replace "absl::nullopt" "std::nullopt"
    replace "absl::in_place" "std::in_place"
    replace "absl::in_place_t" "std::in_place_t"
    add_header "<optional>"
    delete_line_with "\"third_party\/abseil-cpp\/absl\/types\/optional.h\""
    git cl format

Chromium change:
https://chromium.googlesource.com/chromium/src/+/d9d21aa16829a7d471a4f3b3a493a31170ed8271

commit d9d21aa16829a7d471a4f3b3a493a31170ed8271
Author: David Benjamin <davidben@chromium.org>
Date:   Mon Oct 2 23:29:57 2023 +0000

    Make absl::optional a typedef for std::optional

    This only changes the types around. It doesn't rewrite existing uses
    to std::optional, which we can do incrementally.

    absl::optional to std::optional seems to have two visible impacts.
    First, the field order is different (bool first vs bool last).
    std::optional's order (bool last) seems to be better overall, decreasing
    binary size. Second, absl::optional's assertions crash with
    __builtin_trap, while std::optional calls __libcpp_verbose_abort which
    calls base::ImmediateCrash. __builtin_trap permits the compiler to
    combine crash sites within a function but leads to worse crash
    debugging. In base::ImmediateCrash, we'd made a conscious decision to
    prefer debuggability and pay some binary size for it. The net size
    increase brings our optional type in line with that preference.

    For more details see the discussion and document below:
    https://groups.google.com/a/chromium.org/g/cxx/c/XG3G85_ZF1k/m/_QN8adIJBQAJ
    https://docs.google.com/document/d/1AW7q9HCLOk738OCj8Z2U_AKVUC0YIFZWuyRvv09XTHk/edit

    Binary-Size: See discussion above.
    Fuchsia-Binary-Size: See discussion above.
    Bug: 1373619
2023-12-01 10:16:12 +00:00
Emerick Rogul 3e54f696ff Enable CRX cache path 2023-11-21 15:32:13 -05:00
mkarolin d8dac05cfc Use THREAD_CHECKER macros instead of the class itself. 2023-10-12 11:41:58 -04:00
Michael Herrmann 38e8f9638d Support Widevine in Arm64 Brave on Windows (#18695)
The implementation is described in the new README.md file.
2023-08-22 02:23:26 +09:00
Claudio DeSouza 0bcb435a0c UpdateContext added a PUFFIN patches argument
Chromium change:
https://chromium.googlesource.com/chromium/src/+/a78e60c3ac1504174f0cb8af2e95ae1af05d2c53

commit a78e60c3ac1504174f0cb8af2e95ae1af05d2c53
Author: James <deckerjames@google.com>
Date:   Wed May 17 15:21:10 2023 +0000

    Reland "Converting ENABLE_PUFFIN_PATCHES flag to a runtime flag."

    This is a reland of commit 08f64abfea00666c4b6f7ceb22e96c71d330cf51

    Original change's description:
    > Converting ENABLE_PUFFIN_PATCHES flag to a runtime flag.
    >
    > Bug: 1349060,1320481
    > Change-Id: Ibd0921eefe1eac7f0164b7052ae5f8ebab492c89
    > Binary-Size: Replacing courgette patches for component/extension delta updates with the more efficient and easier-to-verify puffin patches.
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4521778
    > Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
    > Reviewed-by: Sorin Jianu <sorin@chromium.org>
    > Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
    > Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
    > Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
    > Commit-Queue: James Decker <deckerjames@google.com>
    > Cr-Commit-Position: refs/heads/main@{#1144853}

    Bug: 1349060,1320481
2023-06-19 16:00:14 -04:00
Claudio DeSouza 0f8baaa6df UpdateClient factory calleable now a RepeatingCallback
Chromium change:
https://chromium.googlesource.com/chromium/src/+/f4aea189c34040ebe58c5ec4ae100f5b8ac856ea

commit f4aea189c34040ebe58c5ec4ae100f5b8ac856ea
Author: Sorin Jianu <sorin@chromium.org>
Date:   Fri May 12 23:19:57 2023 +0000

    update_client: replace (*) with callback for UpdateChecker::Factory.

    Bug: 1445236
2023-06-19 16:00:11 -04:00
Claudio DeSouza 1f8b18df50 UpdateContext added argument for check runs
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d91abf4b79a87df464a43a5adfde44dc6e2d5055

commit d91abf4b79a87df464a43a5adfde44dc6e2d5055
Author: Sorin Jianu <sorin@chromium.org>
Date:   Sat Mar 11 01:48:51 2023 +0000

    Updater: implement CheckForUpdate.

    This function checks for updates, and not download/install.
    Follow up CLs to:
    * remote the function for Posix implementations using Mojo.
    * roll a new CIPD build, fix, and re-enable ondemand legacy tests.

    This CL creates an new function:
    update_client::UpdateClient::CheckForUpdate.

    Bug: 1396103
2023-04-20 23:55:50 -04:00
cdesouza-chromium f9dc6f25ca Use raw_ref<T>/raw_ptr<T> for data members (#18113)
This change corrects all sites where pointer fields were still remaining
in the codebase, and replaces them with `raw_ptr<T>`, and `raw_ref<T>`.
This is in accordance with upstream hardening requirements, which are
about to be enforced by chromium's clang plugin, in M114.

This change goes one step further, and replaces pointer with references
in types where nullptr values are not supposed to be supported.
2023-04-19 23:59:22 +02:00
Aleksey Khoroshilov ae5328be76 Enforce IWYU export pragma in chromium_src headers for src/ includes (#16957)
* Add presubmit check for IWYU export in chromium_src headers.

* Add // IWYU pragma: export to "src/" and "../gen/" includes.

* Export brave grit headers.

* Allow multiple includes for net_log_event_type_list.h.

* Std is not used in search_engines_handler.h.

* Fix recently added headers.
2023-02-14 07:57:35 -05:00
Claudio DeSouza 89f0cf3c99 Fixing missing inclusion in update_checker.cc
This inclusion was possibly occurring in a transient way.
2023-01-25 07:41:10 +00:00
Michael Herrmann dc396a3928 Remove unused code ("OnClientUpdated") 2022-06-10 05:58:24 -04:00
Claudio DeSouza a1f855929c Fix component updates (see brave://components)
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c4e4d69f1c35492628dbb7aadc9ab8254db3e904

commit c4e4d69f1c35492628dbb7aadc9ab8254db3e904
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Wed May 11 18:47:24 2022 +0000

    update_client: Move TLS fallback loop into the update checker.

    Fixed: 645654
2022-06-10 05:58:24 -04:00
Mikhail 6387cfd7d4 Move a part of //brave/common to //brave/components (#13456)
* Move a part of //brave/common to //brave/components

* Fix lint issues

* Remove brave_features.*

* Fix android build

* Remove dead includes

* fix compilation

* Fix review issues

* Fix android gn check

* Revert patch changes

* Fix deps duplication & copyright

* Fix some DEPS/BUILD.gn contradictions

* gn format

* move sources.gni

* Fix nits

* Fix after rebase
2022-05-27 16:44:18 +07:00
Pavel Beloborodov b9749ec40d Using BUILDFLAGs instead of #define-s (#12801)
* BRAVE_INFURA_PROJECT_ID as build flag.

* Build flags instead of compiler defines.

* Patches updated.
2022-03-31 12:43:30 +07:00
mkarolin 084e751eaf UpdateChecker::CheckForUpdates signature changed.
Chromium change:

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

commit c71daa80f0178d271e53174364ee2e0d71568458
Author: Joshua Pawlicki <waffles@chromium.org>
Date:   Thu Dec 2 22:23:06 2021 +0000

    Reland "Component Updater: Refactor disable-updates policy."

    This is a reland of 4df664317fc9f29f608ea8405a55b26c8bd1d8ca

    Patch set 1 is the original change, and patch set 4 is the fixed version.

    Original change's description:
    > Component Updater: Refactor disable-updates policy.
    >
    > The handling of the policy and combination with component data is moved
    > out of update_client (which is used by many embedders) and into
    > component_updater.
    >
    > To achieve this, component_updater's Register no longer takes a strict
    > subset of CrxComponent information as an argument. A new type
    > (ComponentRegistration) is introduced to hold a component's registration
    > information with the component updater, and it is used to construct
    > CrxComponents on the fly in the crx data callback. The policy is applied
    > at that time.
    >
    > There should be no change in behavior, but the simplication of
    > update_client's API makes the behavior of chrome/updater more clear.
    >
    > Bug: 1094024
2022-01-24 15:38:38 -05:00
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
Aleksey Khoroshilov 3b0a9340c0 Remove unnecessary same dir rules in DEPS. 2021-12-08 14:48:24 +07:00
Aleksey Khoroshilov 5a33f242de Remove unnecessary DEPS rules. 2021-12-08 14:48:21 +07:00
Aleksey Khoroshilov 860f6ec6cb Replace relative paths in chromium_src to src-based.
# Conflicts:
#	chromium_src/chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc
#	chromium_src/chrome/browser/ui/views/bubble/bubble_contents_wrapper.cc
#	chromium_src/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
#	chromium_src/chrome/browser/ui/views/page_info/page_info_view_factory.h
#	chromium_src/chrome/common/webui_url_constants.cc
#	chromium_src/components/safe_browsing/content/browser/client_side_model_loader.cc
#	chromium_src/components/translate/core/browser/translate_prefs.cc
#	chromium_src/third_party/blink/renderer/core/loader/subresource_redirect_util.cc
#	chromium_src/third_party/blink/renderer/core/loader/subresource_redirect_util.h
2021-12-08 14:47:35 +07:00
Pranjal Jumde b3802c6d3b Fix #17462 - Refactor component-updater URL overwrites 2021-09-27 16:39:19 -05:00
mkarolin 0e7b362863 base::Optional -> absl::optional.
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/2d59e682ab9eb904124f5778eb8ceb3cb2a90231

commit 2d59e682ab9eb904124f5778eb8ceb3cb2a90231
Author: Anton Bikineev <bikineev@chromium.org>
Date:   Tue May 18 12:29:22 2021 +0000

    Deprecate base/optional.h and fix remaining mentions.

    Docs are still to be updated (in a followup).

    Bug: 1202909

Converted remaining cases of base::Optional to absl::optional, plus
updated DEPS file with an exception that is temporarily required
while we don't have such exception added to Chromium's toplevel DEPS
file (see commit linked below, not yet included in 92.0.4503.5).

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/9662571bb2954fb1759c49e5c45e59571cd1899e

commit 9662571bb2954fb1759c49e5c45e59571cd1899e
Author: Anton Bikineev <bikineev@chromium.org>
Date:   Thu May 13 19:17:50 2021 +0000

    Reland "Alias base::Optional to absl::optional"

    This relands f3493eb4f80c5716ed2d7de195f710537beacc6b. The reason of the
    failure: missing base// dep in some of the internal components, which
    caused the branded builds to fail.

    For sherrifs: the change may cause build failures on bots that are not
    tested in the regular CQ pipeline. Those issues are mostly caused by
    missing base// dependencies. Before reverting this change, please
    consider fixing missing dependencies, similar to what the CL 2891488
    does.

    Original CL description:
    > Alias base::Optional to absl::optional
    >
    > This CL does the following:
    > 1) Replaces base::Optional and friends with aliases to corresponding
    > entities from abseil. base::in_place is the only thing not aliased, as
    > it's also used in other contexts (e.g. StructPtr in mojo).
    > 2) Replaces all optional-related uses of base::in_place with
    > absl::in_place.
    > 3) Fixes missing headers (e.g. base/check.h) that used to be recursively
    > included from base/optional.h
    > 4) Also, removes forward declarations for base::Optional and instead
    > includes "base/optional.h" directly. The argument is the same as for
    > forward declarations of std types - the exact declaration (struct vs
    > class, number of template arguments (e.g. for SFINAE)) is an
    > implementation detail that can change.
    >
    > The CL also tries to support base/optional_unittest.cc (will be removed
    > with base/optional.h) however the nocompile is already removed, since
    > supporting it seems to be harder.
    >
    > Followup CLs will replace base::optional with absl::optional per
    > component.
    >
    > Bug: 1202909
    > Change-Id: I25b276401ceba13da35b3a0331d5ccbd338c4539
    > AX-Relnotes: n/a.
    > Reviewed-on:
    > https://chromium-review.googlesource.com/c/chromium/src/+/2892208
    > Commit-Queue: Anton Bikineev <bikineev@chromium.org>
    > Commit-Queue: Peter Kasting <pkasting@chromium.org>
    > Reviewed-by: Peter Kasting <pkasting@chromium.org>
    > Reviewed-by: Kentaro Hara <haraken@chromium.org>
    > Owners-Override: Peter Kasting <pkasting@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#882460}

    Bug: 1202909
2021-06-29 16:35:39 -04:00
Brian Johnson 7aed8de634 remove x64 override because arm64 is now available for widevine (#8906) 2021-05-22 15:15:56 +01:00
bridiver 2abcbe8926 fix relative include paths for DEPS 2021-02-09 10:23:43 -07:00
bridiver fb3c0f5561 buildtools/checkdeps/checkdeps.py brave --extra-repos=brave runs succesfully 2021-02-06 13:34:00 -07:00
Michael Herrmann 968c5c59a3 Fix failing component auto-updates (#7164)
* Fix broken automatic Component updates

* Reformat code

* Reorder includes to conform to style guide

* Make SequentialUpdateChecker constructor private

* Fix compilation failure

* Add comment
2021-01-07 08:23:29 +00:00
bridiver f9fe0aa646 set all request archs to x64 for apple component updater 2020-12-18 14:08:40 -07:00
bridiver a1bd0bf04e use x64 for macos arm64 in component updater request to workaround google updater not providing update for arm64
fix https://github.com/brave/brave-browser/issues/13074
2020-12-09 10:15:39 +00:00