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 had made services.cc depend on //brave/utility via a chromium_src
override, but that caused a dependency cycle because //brave/utility
also depends on //chrome/utility (e.g. extend some upstream classes),
causing a gn check error.
To fix this, we can follow the pattern used in other places and make
upstream's //chrome/utility directly include the files from Brave that
it needs, and replace the oneliner patch to //chrome/utility/BUILD.gn
with one that would simply include those sources, instead of having it
depend on //brave/utility.
Last, we also add a missing dep on //brave/common/importer:importer
to avoid another gn check failure due to having some files from that
target included from brave_external_process_importer_bridge.h.
Resolves https://github.com/brave/brave-browser/issues/10623
Enable a/b testing for different versions of a resource, e.g. text classification. Change name from UserModel to AdsResource and move code into the brave ads component. Finally removing the bat-native-usermodel dependency from ads.