# This file will be used by emerge in libchrome-XXXX.ebuild to determine the
# order of applying patches.
#
# Support selectively applying patch by use flag, examples:
# * To apply foo.patch to every board, add
#   `foo.patch`
# * To apply foo.patch to board bar only, add
#   `foo.patch board_use_bar`
# * To apply foo.patch to board installing package baz only, add
#   `foo.patch board_use_baz`
# Note: add flag to IUSE in libchrome ebuild if it is not already there.

# ========= LONG TERM PATCHES =========================

# Remove glib dependency.
# TODO(hidehiko): Fix the config in AOSP libchrome.
libchrome-Remove-glib-dependency.patch

# Refer to crbug/1093642 on upstream or abandon these two patches.
# Add MockObjectManager, which is removed upstream.
add-mock-object-manager.patch

# Solve name conflict with abseil in absl package, when a program in Chromium
# OS depends on both abseil and libchrome.
absl-thread-annotation-conflict.patch

# Diagnostic code for upsteram to investigate crbug/1001171.
# We don't need.
revert-crbug-1001171.patch

# libchrome does not support boringssl.
keep-hash-sha1-old-implementation.patch
Do-not-use-boringssl-in-base-UnguessableToken.patch

# libchrome does not support trace_event
# Compatmentalize patches to reduce chance of failing to apply them.
disable-trace_event-in-base.patch
disable-trace_event-in-mojo.patch
disable-trace_event-in-ipc.patch
# To avoid redefinition error when client packages uses real perfetto
add-libchrome-namespace-to-trace_event-stub-perfetto.patch

# Revert of r921558
# When malloc of more than (or close to) max size is called, it should return
# nullptr (and handled by caller) instead of crashing as the original patch
# will do.
Revert-base-allocator-Support-max-alloc-size-with-us.patch

# Avoid reintroduction of the deprecated base::Value APIs
disable-base-Dictionary-List-Value.patch

# Libchrome prefer to have consistent include headers across debug or
# non-debug, since release builders have a lot delay. That may cuase our client
# program unable to discover compilation failure at CQ/postsubmit.
always-include-platform-thread-h.patch

# ==================== CHERRY PICKS ===========================
# For use of new base::CopyFileContentsWithSendfile
# Remove after r938742
Handle-seq_files-with-base-CopyFileContents.patch

# Remove after r943984
libchrome-Query-spaced-for-free-total-disk-space.patch

# ==================== BACKWARD / FORWARD COMPATIBILITY PATCHES FOR UPREVS ===
# TODO(b/192529039): Remove when all base::Optional usages are migrated to
# std::optional
backward-compatibility-Add-base-Optional-as-alias-of-absl-optional.patch

# Backward compatibility patch to add support of SimpleAlarmTimer
# TODO(b/196308068): remove after usages in shill and power_manger are removed
backward-compatibility-add-SimpleAlarmTimer.patch

# Backward compatibility for r890000 uprev
# Adds base::Callback, base::Bind, etc as there are still many usages in CrOS
# TODO(crbug.com/1205291): remove when they are all migrated to Once/Repeating
# variants
backward-compatibility-add-deprecated-base-Bind-APIs.patch

# Backward compatibility patch to temporarily add base::AdaptCallbackForRepeating
# TODO(b/204383858): Remove the patch when usage in mri_package is removed
backward-compatibility-add-base-AdaptCallbackForRepaeting.patch media_perception

# Forward compatibility for >r930627 uprev to add stub header files for those
# moved from base/ to base/task/
forward-compatibility-add-stub-header-files-under-base-task.patch

# Forward compatibility for >r931363 uprev to rename base::Handing{L=>M}RUCache
forward-compatibility-add-base-HashingLRUCache-as-alias-of-base-HashingMRU.patch

# Forward compatibility for >r935463 uprev to migrate
# base::TaskAnnotator::RunTask from taking pending task as ptr to as ref
forward-compatibility-base-TaskAnnotator-RunTask-takes-pending-task-as-ref.patch
