This changes our COMPONENT_EXPORT macros to make the things they export
visible all the time on non-windows, rather than making them visible in
the named component only. This avoids subtle bugs where things defined
in multiple components end up with one copy per component, only one of
which is visible, and so the linker doesn't know it's supposed to dedup
them.
Some, but not all, of these issues are detected by the new clang warning
-Wunique-object-duplication. This change addresses some instances of that
warning firing on chromium code, but not all. Conversely, there are likely
instances which the warning does not catch, which are fixed by this CL.
Bug: 368047728
Change-Id: I829a9bd84e57e3c7d80ec33aea0408951019bde7
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6264795
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
Cr-Commit-Position: refs/heads/main@{#1456614}
Having removed is_chromeos_lacros and is_chromeos_ash uses, almost all
imports of build/config/chromeos/ui_mode.gni (under components/) are
obsolete. Remove them.
Also remove some DEPS entries that reference Lacros sources that no
longer exist.
Bug: b:354842935
Change-Id: Ia300c150cc591cde0156510c8d9333e5fe5576e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108472
Reviewed-by: Jun Ishiguro <junis@google.com>
Owners-Override: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1400016}
Having removed IS_CHROMEOS_ASH and IS_CHROMEOS_LACROS uses, almost
all includes of chromeos_buildflags.h have become obsolete.
Bug: b:354842935
Change-Id: I1c3e33f12ea63f9444b841c465de5b37c4ae4b80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108703
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jun Ishiguro <junis@google.com>
Owners-Override: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1400011}
Remove NetworkSettingsService and related crosapi interfaces as well
as their implementations. They are no longer needed.
This includes deprecating the ash.lacros_proxy_controlling_extension
preference.
No change in behavior intended.
Bug: b:365741912
Change-Id: I2abd425d5e0c87f4ddcd97b1d068e420d47e4857
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054898
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Andreea Costinas <acostinas@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1390781}
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().
This CL does not attempt to do additional rewrites of any surrounding
code, like:
if (!foo) {
NOTREACHED();
}
to CHECK(foo);
Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.
Bug: 40580068
Change-Id: I72205fb77747957c6bf33dbea93656fd20085a42
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6010008
Reviewed-by: Rick Byers <rbyers@chromium.org>
Owners-Override: Rick Byers <rbyers@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1382618}
I need an owner's approval please for changes under:
components/prefs
This is a mechanical change. There are a few instances (but not all)
of empty user-defined constructors and destructors which can be
defaulted in the /components code.
This CL was uploaded by git cl split.
R=gab@chromium.org
Bug: 371316188
Change-Id: I63c39f2856361e8c805f424a69968251202ce175
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5917418
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Auto-Submit: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1366028}
NOTREACHED() has turned [[noreturn]] so the former macro isn't needed
anymore.
This does not attempt to do a rewrite of any surrounding code, like:
if (!foo) {
NOTREACHED();
}
to CHECK(foo);
Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.
NO_IFTTT=No-op-rename migration.
Bug: 40580068
Change-Id: I068c5fdce9dc4c352d8bdd62bb3cd2c0a2d59659
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5782602
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1342096}
This is a small preparation for changing the signature of
OnPrefValueChanged to take a std::string_view. Currently, there is a
third-party implementation of PrefStore::Observer inside libaddress.
Adding default implementations lets us remove that method override
from libaddress and makes changing the function signature possible
in a single (follow-up) CL.
Bug: 349741884
Change-Id: I15d460aaf62a13519c93de78c932d1acdd53fddd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5662299
Auto-Submit: Jan Keitel <jkeitel@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Jan Keitel <jkeitel@google.com>
Commit-Queue: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320241}
This CL adds transparent hashing and transparent equality comparisons
to the std::unordered_map<std::string, Preference> that it keeps.
This should be a no-op for any interactions with the map that involve
a std::string:
- Comparisons just forward to std::string comparisons.
- Hashing for std::basic_string_view and std::basic_string is identical.
However, this CL allows to use a std::string_view when calling
std::unordered_map::find without requiring to convert the string_view
to a std::string first.
The CL takes advantage of that by replacing a few more const reference
to std::string by std::string_view. This avoids potential heap
allocations and reduces the binary size by ~3KB.
Bug: 349741884
Change-Id: Ifcfd7638ee27f641097ad3929bc7fa58c4260b3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5658436
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Jan Keitel <jkeitel@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320204}
No functionality changes - this is a pure replacement of const
std::string& parameters by std::string_view parameters.
Bug: 348307659
Change-Id: I5ba0658bcb4e68a5f20948d699898bfcd974bc82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5640036
Commit-Queue: Jan Keitel <jkeitel@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1317292}
These prefs are set by Lacros via crosapi. If Lacros is disabled, the
prefs are not updatable from Ash thus they should be cleared upon
Lacros disablement.
Bug: 297826137
Change-Id: I7706848d74374a9b583bdd9c5db30a3cc9e3b355
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5562385
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Dominic Battré <battre@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313237}
Currently, calling any getter/setter in WrapWithPrefixPrefStore with a
key prefixed with "the" prefix (the one that WrapWithPrefixPrefStore
works on), leads to a CHECK failure. However, WrapWithPrefixPrefStore
should not disallow having a pref with the prefix as a key, and it
should be the responsibility of the owner to ensure the prefix is not
used as a pref, if needed.
Bug: 336776819
Change-Id: I3c94ffa34696f3c1a5e804a7bc96a3b469907bc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5563686
Auto-Submit: Ankush Singh <ankushkush@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Ankush Singh <ankushkush@google.com>
Cr-Commit-Position: refs/heads/main@{#1312780}
This operates on a dictionary managed by another PersistentPrefStore.
It works by prefixing all the queries with the provided prefix.
This should allow having multiple pref stores work on the same
underlying file.
Bug: 336776819
Change-Id: I3445b562eb0eba28b7cbf8fbdb362ea5d33b67dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5512607
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Ankush Singh <ankushkush@google.com>
Cr-Commit-Position: refs/heads/main@{#1301248}
This was generated by replacing " NOTREACHED()" with
" NOTREACHED_IN_MIGRATION()" and running git cl format.
This prepares for making NOTREACHED() [[noreturn]] alongside
NotReachedIsFatal migration of existing inventory.
Bug: 40580068
Change-Id: I92e83d0b564d44267f003147a1ce6ba3674621a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539175
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1300923}