* 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
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
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/_QN8adIJBQAJhttps://docs.google.com/document/d/1AW7q9HCLOk738OCj8Z2U_AKVUC0YIFZWuyRvv09XTHk/edit
Binary-Size: See discussion above.
Fuchsia-Binary-Size: See discussion above.
Bug: 1373619
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
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
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
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
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
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
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
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.
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.
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/+/2e6be1400ab678f21d871d0d3a1199912967324fhttps://chromium.googlesource.com/chromium/src.git/+/5666ff4f5077a7e2f72902f3a95f5d553ea0d88dhttps://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
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
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
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
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
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
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