Commit Graph
168 Commits
Author SHA1 Message Date
cypt4 5b8ea34b73 Move Zcash protobuf parsing to separate process (#21627)
* Move Zcash protobuf parsing to separate process
Introduces BraveWalletUtilsService that is able to provide ZCashDecoder
to convert protobufs to mojo structs and pass them to the mai.
Resolves https://github.com/brave/brave-browser/issues/34561
2024-01-30 03:26:41 +07:00
Claudio DeSouza 0b7c5cf688 password_manager core files moved to password_store subfolder
This is merely a file path restructuring that doesn't affect brave's
codebase beyond fixing patches, inclusion paths, and shadowing files.

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

commit fa7338ad8aa34f8c7ff1d143725417604ff7eeb2
Author: Viktor Semeniuk <vsemeniuk@google.com>
Date:   Fri Nov 3 14:55:46 2023 +0000

    Adding password_store subfolder to c/password_manager/core/browser/

    This CL moves some of the files from core/browser/ to
    core/browser/password_store. More files will be moved in a follow up.

    Bug: 1479425
2024-01-15 14:25:48 -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
Claudio DeSouza 664d94be40 base::Time conversion function renamed
Upstream has renamed a couple of functions that were used for coversion
between `base::Time`, and double. The new names reflect better the
actual purpose of this functions.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/08b91b49531894cbe9061a1148fd535155c2554b

commit 08b91b49531894cbe9061a1148fd535155c2554b
Author: Peter Kasting <pkasting@chromium.org>
Date:   Sat Oct 21 03:46:09 2023 +0000

    Rename many Time functions:

    * `FromDoubleT()` -> `FromSecondsSinceUnixEpoch()`
    * `ToDoubleT()` -> `InSecondsFSinceUnixEpoch()`
    * `FromJsTime()` -> `FromMillisecondsSinceUnixEpoch()`
    * `ToJsTime*()` -> `InMillisecondsFSinceUnixEpoch*()`
    * `FromJavaTime()` -> `FromMillisecondsSinceUnixEpoch()`
    * `ToJavaTime()` -> `InMillisecondsSinceUnixEpoch()`

    These are more descriptive of the functionality.

    No other changes, aside from typecasting fixes in the following files:

    * chrome/browser/ash/arc/fileapi/arc_documents_provider_root.cc
    * third_party/blink/renderer/modules/notifications/notification_data.cc
    * third_party/blink/renderer/modules/notifications/notification_data_test.cc

    Further cleanup will happen separately, since this CL as-is isn't really
    reviewable, only stampable.

    Bug: none
2023-11-27 11:27:40 -05:00
Claudio DeSouza 480a10f253 PasswordForm passed around by value
Functions on `LoginDatabase` are now passing `PasswordForm` by value.
This change corrects our use of it, and make the code around it to use
references when referring to `PasswordForm` instances for better
readability.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/1de3dd85f6076a1bf816a16a2fe0617d6739df1f

commit 1de3dd85f6076a1bf816a16a2fe0617d6739df1f
Author: Viktor Semeniuk <vsemeniuk@google.com>
Date:   Fri Sep 29 09:01:04 2023 +0000

    Replacing unique_ptr<PasswordForm> with PasswordForm in login database

    Bug: 1484572
2023-10-23 13:19:07 +01:00
Claudio DeSouza c3506d8f5d chromium_strings renamed to branded_strings
This change has affected inclusion paths in cxx and gn.

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

commit d78ab264fc6d9d013047f9d7bf1beafb00c02ebd
Author: Henrique Ferreiro <hferreiro@igalia.com>
Date:   Wed Sep 13 11:21:43 2023 +0000

    Rename chrome/app/ branding strings

    Branded string targets and generated header files were named
    "*chromium_strings" and "*chromium_strings.h", respectively. This is
    the result of originally having a chromium and google_chrome version of
    those. After https://crrev.com/c/4703485 there's a single version, so
    rename to "*branded_strings*" for consistency.

    This CL performs this renaming in chrome/app/.

    Bug: 1470725
2023-10-23 13:19:03 +01:00
zenparsing 2f852e3c6d Replace ledger terminology in Rewards code 2023-07-11 14:47:11 -04:00
Claudio DeSouza 443251ccae [CodeHealth] Removing base::Value Find*Path uses
This PR removes the use of deprecated base::Value functions that are set
to be deleted upstream, namely FindPath, and its companions.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/99a884ced145f4086403439df9dc4bb21a406077

commit 99a884ced145f4086403439df9dc4bb21a406077
Author: Andrew Rayskiy <greengrape@google.com>
Date:   Tue May 16 08:50:44 2023 +0000

    [CodeHealth] Remove FindPath() from base/values.{h,cc}

    R=dcheng@chromium.org

    Bug: 1439196
2023-06-09 16:56:42 +01:00
tapanmodh d4cfc48a90 import export bookmarks android 2023-05-11 01:13:41 +05:30
zenparsing 33663efde1 Simplify Rewards namespacing 2023-04-24 16:29:15 -04:00
mkarolin f0ff963c26 Fixes license headers flagged by presubmit check. 2023-04-20 23:57:07 -04:00
Claudio DeSouza 5b6ca2c729 os_crypt moved into sync subdirectory
Chromium change:
https://chromium.googlesource.com/chromium/src/+/93d0dcd55046ac06154f4d642c26d7697c4b0304

commit 93d0dcd55046ac06154f4d642c26d7697c4b0304
Author: Will Harris <wfh@chromium.org>
Date:   Tue Mar 14 23:38:47 2023 +0000

    Move os_crypt into a sync/ subdirectory.

    This is a prerequisite for landing the new version of OSCrypt
    that will support async.

    All callers are updated to call into os_crypt/sync.

    Future CLs will land new code into os_crypt/async and migrate
    callers as necessary.

    BUG=1373092
2023-04-20 23:56:14 -04:00
Szilard Szaloki e8bcdc7e58 Fix-up. 2023-04-11 10:47:30 -05:00
Szilard Szaloki 31ca383797 Rewards architectural improvements. 2023-04-11 07:40:54 -05:00
Cepera d100c6a55f Import passwords from Google Account data (#17594) 2023-03-15 11:12:16 +03:00
Emerick Rogul 7d7bca1cef bind.h, callback{,_forward,_helpers}.h now located in //base/functionality
Chromium change:

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

commit cd23b8b9d212daf06dde638488dbaa355d6651fa
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Fri Sep 16 17:16:24 2022 +0000

    Move bind.h, callback{,_forward,_helpers}.h into //base/functional

    Forwarding headers remain in the old locations to ease migration.
    Include paths for files in //base/functional/ are also fixed up to the
    new canonical path; remaining fixups are deferred until followups to
    minimize the risk of conflicts.

    Bug: 1364441
2023-02-22 06:29:17 -05:00
cdesouza-chromium 932606f421 Task posting v3 handle refactor (#16857)
Task posting v3 handle refactor - II

This change is following upstream refactor for task runner provisioning.
This primarily involves changing how we are fetching the default current
sequence/thread runners.

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

commit edb604e09fa4ac6eb56f447b643085afda6150a9
Author: Sean Maher <spvw@chromium.org>
Date:   Thu Jan 12 15:18:20 2023 +0000

    task posting v3: Remove task runner handles from codebase entirely

    As the last CL of the task runner handle refactor, this CL removes
    Single and Thread task runner handles from the codebase entirely. The
    new API for this functionality can be found under
    (SingleThread|Sequenced)TaskRunner::CurrentDefaultHandle,
    ::GetCurrentDefault(), ::HasCurrentDefault(), and
    ::CurrentHandleOverride(ForTesting).

    Bug: 1026641
2023-01-27 09:49:00 +00:00
Simon Hong 6e9e92dd20 Support importing from Whale browser
fix https://github.com/brave/brave-browser/issues/27641
2023-01-14 11:33:20 +09:00
Cepera 0c7b3976fd Add import from Yandex browser (#16441) 2022-12-22 11:57:48 +03:00
Emerick Rogul 75268839ce Fix warnings introduced by -Wshadow to detect shadowed variables
Chromium change:

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

commit e3f001526b14f073e8e517986673ed8a4877fc1a
Author: Lei Zhang <thestig@chromium.org>
Date:   Wed Aug 31 05:14:51 2022 +0000

    Enable -Wshadow on Linux.

    In net/third_party/quiche/BUILD.gn, a build config containing
    -Wno-shadow accidentally affected its transitive dependencies. As a
    result, many files introduced shadow variables without triggering
    -Wshadow warnings.

    Make the -Wno-shadow config private to the quiche dir for Linux
    builds, which makes -Wshadow the default for first-party code. Then
    selectively add temporary -Wno-shadow warnings to build configs that
    contain files with shadow variables. This prevents developers from
    adding shadow variables in a large portion of the code base, and makes
    it easier to finish fixing this issue.

    Bug: 1344231
2022-10-13 16:20:04 -04:00
Claudio DeSouza 89797b2bf4 Re-enabling -Wunreachable-code-aggressive
This warning flag was being overriden due to build errors on our
overrides with chromium. However, this build warning is very useful, and
we can suppress it with `if ((true))` statements that will elide the
code.

This warning can be very useful in pointing out small misconceptions
in code behaviour.
2022-08-31 23:27:43 +01:00
Claudio DeSouza af511ff091 [CodeHealth] Clang-tidy make_unique modernise II
This change applies clang-tidy with modernize-make-unique to the
codebase, correcting all instatiations of unique_ptr to use
std::make_unique.
2022-08-30 12:04:55 +01:00
Claudio DeSouza 2987acef1e [CodeHealth] Clang tidy browser with use-equals-default V
This change corrects the constructors of several classes under
browser/, using clang-tidy's modernize-use-equals-default. Additionally,
this commit includes a few additional straggler files.
2022-08-17 15:48:08 +01:00
sergei p 195f13f990 Import passwords for Vivaldi 2022-08-17 07:20:15 +03:00
Sergey P 14cf9b0c34 Import passwords for Microsoft Edge 2022-08-17 07:20:15 +03:00
cdesouza-chromium 4ccecd295e Merge pull request #14627 from brave/clang-tidy-loop-moderniser-III
[CodeHealth] Applying clang-tidy modernize-loop-convert III
2022-08-16 14:51:59 +01:00
Sergey P 9c6cbff60c Import passwords for Opera 2022-08-16 09:52:28 +03:00
Claudio DeSouza a6e8d9eda2 [CodeHealth] Applying clang-tidy modernize-loop-convert III
This change applies clang-tidy modernize-loop-convert across a couple of
files in Bravs, mostly under vendor/.
2022-08-15 17:17:26 +01:00
cdesouza-chromium f755b6743e Merge pull request #14052 from brave/additional-base-value-refactoring
Additional base value refactoring
2022-07-25 19:31:28 +01:00
Cepera cd486a8641 Import from Opera (#14006)
* Added Opera importer

* Fixed password import for Opera

* Disabled passwords import for OSX
2022-07-21 15:56:43 +03:00
Claudio DeSouza e3893ce137 base::Value modernisation for ChromeImporter
This change updates the use of base::Value in ChromeImporter, removing
the use of any deprecated interfaces/methods.
2022-07-20 19:01:20 +01:00
Cepera 5aa6867d67 Added import from Vivaldi (#13990) 2022-07-14 17:18:10 +03:00
Cepera 3ba1f365ec Added Chromium-based Edge importer (#13963)
Added Chromium-based Edge importer
2022-07-04 13:30:26 +03: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
Mario Sanchez Prada 7d7f5e7554 Added missing includes for build/build_config.h 2022-03-22 10:57:30 +01:00
Mario Sanchez Prada f4c7bdda37 Migrate define(OS_*) to using BUILDFLAG(IS_*) instead
See the following PSA in the chromium-dev mailing list for more
information and links to the original discussion, the design
document and the metabug:

https://groups.google.com/a/chromium.org/g/chromium-dev/c/EIuQCy9sVfw/m/Net3FPz6AwAJ

Resolves https://github.com/brave/brave-browser/issues/21608
2022-03-22 10:57:30 +01:00
Mario Sanchez Prada 06f884ff74 Remove includes to base/macros.h using base/ignore_result.h when needed
Only a couple of files really need to include this header now to use
ignore_result(), and we can just drop the include from everywhere else.

Chromium changes:

https://chromium.googlesource.com/chromium/src.git/+/2e6be1400ab678f21d871d0d3a1199912967324f
https://chromium.googlesource.com/chromium/src.git/+/5666ff4f5077a7e2f72902f3a95f5d553ea0d88d
https://chromium.googlesource.com/chromium/src.git/+/3a3f9436142e712d4a7e2a962d85154876fa395f

commit 2e6be1400ab678f21d871d0d3a1199912967324f
Author: Peter Boström <pbos@chromium.org>
Date:   Sat Nov 13 01:28:25 2021 +0000

    Rename "base/macros.h" => "base/ignore_result.h"

    This file only contains ignore_result() and is no longer a collection of
    macros.

    This change fixes a couple of missing IWYU removals as well.

    Bug: 1010217

commit 5666ff4f5077a7e2f72902f3a95f5d553ea0d88d
Author: Peter Boström <pbos@chromium.org>
Date:   Fri Nov 12 03:40:24 2021 +0000

    Remove most remaining unused "base/macros.h"

    Removes `#include "base/macros.h"` from remaining .cc, .h and .mm files
    that do not contain `ignore_result(` and do not trigger pre-commit or
    pre-upload errors.

    Bug: 1010217

commit 3a3f9436142e712d4a7e2a962d85154876fa395f
Author: Peter Boström <pbos@chromium.org>
Date:   Mon Nov 8 21:04:37 2021 +0000

    Add #include "base/macros.h" for ignore_result()

    This fixes IWYU for existing instances of ignore_result() to make
    removal of #include "base/macros.h" from files using it for DISALLOW_*
    macros easier.

    Bug: 1010217
2022-01-24 15:33:44 -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
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
mkarolin 204de8080f sql::Statement::ColumnBlob() now returns base::span.
Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/1268a99

commit 1268a999c4a953d7e2b2c26bf9fa019e38ee0504
Author: Victor Costan <pwnall@chromium.org>
Date:   Fri Jul 16 17:16:39 2021 +0000

    sql: Change the Statement::ColumnBlob() return type to base::span.

    ColumnBlob() currently returns a pointer to a data buffer, which must be
    paired with the return result of ColumnByteLength(). This made sense
    when the code was written, but we have safer and more ergonomic
    alternatives now.

    This CL switches the return type to base::span<const uint8_t>, which is
    the closest reflection of the fact that BLOBs are arrays of bytes.
    sql::Statement still has helpers for retrieving BLOB data as std::string
    and std::vector<char> / std::vector<uint8_t>.

    Bug: 1229451
2021-09-13 14:52:55 -04:00
Mario Sanchez Prada f15fe540d8 Remove const qualifier for sql::Statement parameter
The sql::Statement parameter passed to DecryptedCardFromColumn()
can't be const as the method will call ColumnByteLength() over it,
which is no longer declared a const method.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/081d534f16b6b1523ca9a87a081285ab01d30265

commit 081d534f16b6b1523ca9a87a081285ab01d30265
Author: Victor Costan <pwnall@chromium.org>
Date:   Thu Jul 15 14:23:59 2021 +0000

    sql: Remove const qualifier from Statement::Column*() methods.

    The sql::Statement::Column*() methods are currently const, which
    suggests no internal state changes.

    This is incorrect for the following reasons.

    1. GetColumnType()'s comment indicates that Column*() perform SQLite
       type conversion. So, the methods appear to change the underlying
       SQLite state.
    2. In general, the methods call into SQLite, and we can't guarantee that
       SQLite state doesn't change.

    This CL fixes the problem by removing the const qualifier from the
    impacted methods.

    Bug: 1229420
2021-08-18 10:58:48 -04:00
Mario Sanchez Prada 55223c1eed Port away from deprecated ListValue::empty()
We should use GetList().empty() now.

Chromium change:

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

commit ffeeed8d45af58f284a8b3624491745e7b10d2b1
Author: Morten Stenshorne <mstensho@chromium.org>
Date:   Thu Jul 8 22:58:38 2021 +0000

    CodeHealth: Remove ListValue::empty()

    All usage should be replaced with Value::GetList()::empty() by now.

    Bug: 1187065
2021-08-18 10:57:38 -04:00
Terry Mancey a327261a53 Remove Brave Ads build flags 2021-08-17 11:42:17 -05:00
sergey 0b3ff3fcf7 Rename ipfs_enabled -> enable_ipfs
ipfs_local_node_enabled -> enable_ipfs_local_node
2021-08-09 19:21:13 +03:00
Brian Clifton 7b63e0b3f4 Remove brave_rewards_enabled build flag
Fixes https://github.com/brave/brave-browser/issues/14783
2021-08-03 13:49:59 -07:00
Mario Sanchez Prada 8d40791ea5 Migrate away from using ListValue's iterators
They are no longer available now and ListValue::GetList() should be
used instead now.

Chromium change:

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

commit fe59284a48bc5a3af8f058b048e3cc1fe260a1b9
Author: David Bertoni <dbertoni@chromium.org>
Date:   Thu May 13 22:46:56 2021 +0000

    [CodeHealth] Remove ListValue::begin()/end().

    This CL removes these deprecated member function.

    Bug: 1187107
2021-06-29 16:35:40 -04: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
Mario Sanchez Prada b3a3e4558b Migrate usage of base::[ASCII|UTF8]ToUTF16 to u literals.
We need to use either u"..." literals or char16_t constant strings now.

Chromium changes:

https://chromium.googlesource.com/chromium/src.git/+/522370fb5f2b8ec0719a3752bcac4897164dd32d

commit 522370fb5f2b8ec0719a3752bcac4897164dd32d
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Fri Apr 16 17:22:39 2021 +0000

    [LSC] Disallow base::ASCIIToUTF16("...") outside of tests

    This change modifies base::ASCIIToUTF16 to cause compilation errors when
    it is used with a string constant outside of tests. Instead, callers
    should just use a UTF16 literal (u"...") instead.

    Bug: 1189439

https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd

commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Sun Mar 14 19:37:05 2021 +0000

    [LSC] Remove base/strings/string16.h

    This change removes base/strings/string16.h and remaining references to
    it from the code base.

    Bug: 1184339

commit 9ca8a38a28e547d0c47630e3e56a69d06c7ab68b
Author: Peter Kasting <pkasting@chromium.org>
Date:   Wed May 12 03:08:22 2021 +0000

    Ban UTF8ToUTF16 on compile-time string constants.

    Bug: 1189439
2021-06-29 16:35:01 -04:00
Simon Hong bd79338b79 Deleted chrome/utility/services.cc patch
fix https://github.com/brave/brave-browser/issues/16457

Used BraveContentUtilityClient::RegisterMainThreadServices() instead.
2021-06-16 11:42:00 +09:00
Mario Sanchez Prada 79af4bc963 Replace all usage of base::string16 with std::u16string
The "base/strings/string16.h" file does no longer exist and we need
to remove all remaining usages of that type with the one from the
C++ standard library instead, like Chromium upstream already did.

Also replaces no longer needed ASCIIToUTF16 and UTF8ToUTF16 calls used
with constant strings with `u` string literals.

Chromium change:

https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd

commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Sun Mar 14 19:37:05 2021 +0000

    [LSC] Remove base/strings/string16.h

    This change removes base/strings/string16.h and remaining references to
    it from the code base.

    Bug: 1184339
2021-05-05 12:03:20 +02:00