0
Commit Graph

82 Commits

Author SHA1 Message Date
b8be952f6c Migrate TODOs referencing old crbug IDs to the new issue tracker IDs
The canonical bug format is TODO(crbug.com/<id>). TODOs of the
following forms will all be migrated to the new format:

- TODO(crbug.com/<old id>)
- TODO(https://crbug.com/<old id>)
- TODO(crbug/<old id>)
- TODO(crbug/monorail/<old id>)
- TODO(<old id>)
- TODO(issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/<old id>)
- TODO(https://issues.chromium.org/u/1/issues/<old id>)
- TODO(bugs.chromium.org/<old id>)

Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues.
See go/crbug-todo-migration for details.

#crbug-todo-migration

Bug: b/321899722
Change-Id: I89f0a4d7ddeb7c9585f3a0e5421aef8ce5a6f0f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5455854
Reviewed-by: Taylor Bergquist <tbergquist@chromium.org>
Commit-Queue: Alison Gale <agale@chromium.org>
Owners-Override: Alison Gale <agale@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287738}
2024-04-16 00:00:31 +00:00
d8fb407fb6 Modernize code in //components/memory_pressure
Run `clang-format -i` followed by `git cl format` in this directory.

Change-Id: I2d08c3561771b51cd615957b1425661242e4d13a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426222
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1283348}
2024-04-05 20:12:13 +00:00
adf3d9b3bd Remove Memory.System.AvailableMB histogram
The histogram "Memory.System.AvailableMB" is recorded every 5 secs on
Windows (http://crrev.com/c/4200608). This is causing lock contention
inside base::StatisticsRecorder::FindHistogram. We are seeing some jank
instances on UI thread, especially on low to mid range devices (RAM 2GB
to 6GB). During code review, it was pointed out that this histogram is
redundant, hence removing it.

Memory.System.AvailableMB histogram is redundant with
Memory.Experimental.AvailableMemoryMB (cross-platform) which is recorded
here: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/performance_manager/metrics/metrics_provider_desktop.cc;l=244;drc=bb3b7c5fa491b98146018d70a6e7a0b5e70be0a2

Bug: 328021880
Change-Id: I38bafa38b38dd10a4206bfad4cdca3a87850861e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5357499
Reviewed-by: Sam Fortiner <samfort@microsoft.com>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Commit-Queue: Ujesh Nambiar <ujeshn@microsoft.com>
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1272870}
2024-03-14 17:01:36 +00:00
b393604ea6 [buganizer] Migrate DIR_METADATA components/k-n*
Migrate all metadata files for components/ folders starting from k to n
and mixins used by metadata files under those folders.

Verify components with http://b/components/{id} or at
go/chrome-on-buganizer-prod-components.

Bug: chromium:1518875
Change-Id: Ie49d4768745b8f7c325d14eef1de4e4e525cdae9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5277565
Commit-Queue: Jeff Yoon <jeffyoon@google.com>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1257969}
2024-02-08 16:44:56 +00:00
c571efbef3 Rename {absl => std}::optional in //components/
#cleanup

Automated patch. This is a no-op. Please avoid, to assign unrelated
bugs to this, as much as possible.

Context:
https://groups.google.com/a/chromium.org/g/cxx/c/nBD_1LaanTc/m/ghh-ZZhWAwAJ?utm_medium=email

As of https://crrev.com/1204351, absl::optional is now a type alias
for std::optional. We should migrate toward it.

Script:
```
function replace {
  echo "Replacing $1 by $2"
  git grep -l "$1" \
    | cut -f1 -d: \
    | grep \
      -e "^components/" \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
    | grep -v \
      -e "components/cast_streaming/browser/public/receiver_config.*" \
      -e "components/power_metrics/*" \
      -e "components/zucchini/patch_reader.*" \
    | sort \
    | uniq \
    | xargs sed -i "s/$1/$2/g"
}
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"
replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>"

echo "Formatting:"

echo "IncludeBlocks: Regroup" >> ".clang-format"
echo "IncludeIsMainRegex: \"(_(android|apple|chromeos|freebsd|fuchsia|fuzzer|ios|linux|mac|nacl|openbsd|posix|stubs?|win))?(_(unit|browser|perf)?tests?)?$\"" >> ".clang-format"
git cl format
git restore ".clang-format"

git cl format
```

Bug: chromium:1500249
Change-Id: I34b45aba082a627d94fd9d3f9f994a60c64b40b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5200092
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1252820}
2024-01-26 20:26:18 +00:00
28552bfb20 ChromeOS: Add Unnecessary Discard Monitor to Page Discarder
Adds usage of the Unnecessary Discard Monitor to page discarder.

Bug: b:309901919
Change-Id: If41d24ead6dc3265ce8c4c4bbe0687f5d0134520
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5076292
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Brian Geffon <bgeffon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245069}
2024-01-10 03:28:09 +00:00
f0282fcb25 ChromeOS: Add Unnecessary Discard Monitor
Adds the unnecessary discard monitor to track and report discards that
were performed unnecessarily due to a stale reclaim target being
processed.

Bug: b:309901919

Change-Id: Ic01e3bc1832fcf1cfa94024359274b40c3c889cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5013300
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Brian Geffon <bgeffon@chromium.org>
Reviewed-by: Olivier Li <olivierli@chromium.org>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245047}
2024-01-10 02:15:41 +00:00
7c5d378ec4 ChromeOS: Change ReclaimTarget to use std::optional
absl::optional will soon be removed, so switch ReclaimTaret to use
std::optional instead.

Bug: b:309901919
Change-Id: I77b0edd21ceedf15811643ee329399a1b6ac7644
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5148589
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1244447}
2024-01-09 03:50:02 +00:00
271e6c70f2 ChromeOS: Add Memory Pressure Signal Origin Time
Adds plumbing for the memory pressure signal origin time supplied by
resourced.

Bug: b:309901919
Change-Id: Ie32976089d8d2687c8feaf8057dff9820d35b820
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5068216
Reviewed-by: Brian Geffon <bgeffon@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Kameron Lutes <kalutes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1240405}
2023-12-22 01:21:02 +00:00
e1c0d01fec Remove uses of implicit conversion of ScopedTypeRef in /components
Implicit unwrapping of a scoper to its underlying pointer is dangerous
and that capability is being removed. This converts uses of implicit
conversion to be explicit in preparation for its removal, and performs
other cleanup and modernization.

This was committed as https://crrev.com/c/4979673 but reverted due to
a bug. This relands it with the bug fixed.

Bug: 1495439
Low-Coverage-Reason: LARGE_SCALE_REFACTOR Switching from implicit to explicit
Change-Id: Ida8e222c28917a574883a3502570123584c30969
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4994366
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1218807}
2023-11-02 15:01:00 +00:00
ff31fdd149 Revert "Remove uses of implicit conversion of ScopedTypeRef in /components"
This reverts commit a84d64e3c8.

Reason for revert: crbug.com/1497943 crbug.com/1497963

Original change's description:
> Remove uses of implicit conversion of ScopedTypeRef in /components
>
> Implicit unwrapping of a scoper to its underlying pointer is dangerous
> and that capability is being removed. This converts uses of implicit
> conversion to be explicit in preparation for its removal, and performs
> other cleanup and modernization.
>
> Bug: 1495439
> Change-Id: I4d64f17d3442682281e61030a33cd55b5a493031
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4979673
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1217168}

Bug: 1495439
Change-Id: I572bf8a164041489bcc04220cd583d4a740162f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4994686
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217574}
2023-10-31 14:48:02 +00:00
a84d64e3c8 Remove uses of implicit conversion of ScopedTypeRef in /components
Implicit unwrapping of a scoper to its underlying pointer is dangerous
and that capability is being removed. This converts uses of implicit
conversion to be explicit in preparation for its removal, and performs
other cleanup and modernization.

Bug: 1495439
Change-Id: I4d64f17d3442682281e61030a33cd55b5a493031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4979673
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217168}
2023-10-30 20:24:38 +00:00
42f9d8fe64 Move some base/apple/ files into base:🍎:
Bug: 1474628
Change-Id: I1ba27e9e5d692d4fbaad8830646fb70632d2cc57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4799473
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1186166}
2023-08-21 23:57:01 +00:00
a09d7dda2e Move scoped_cftypreref to base/apple, leave a forwarding header
Crashpad is not yet updated for the new location, so leave a
forwarding header to be removed later.

Bug: 1444927
Change-Id: Ib00aa68980726f7702f740d543953abe397ffddc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4790741
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1184758}
2023-08-17 16:26:58 +00:00
e2e2a2d3dc Move scoped_dispatch_object to base/apple
Bug: 1444927
Change-Id: Ia860f25e39e349a10404d0f536005d3720720f6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4782890
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1184351}
2023-08-16 20:33:10 +00:00
5d32f181ea Rename message_pump_mac to "apple" because iOS uses it too
Bug: 1444927
Change-Id: I8dbc804287d94af2314f41f286f764a278c14a91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4781113
Owners-Override: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1184169}
2023-08-16 15:26:39 +00:00
d0c3d5815c Remove the MacRenotifyMemoryPressureSignal feature
Bug: 1417298
Change-Id: I89414ad207969949a7b370c8a1dbd505c2ca5ab1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545020
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1145942}
2023-05-18 14:57:43 +00:00
76c48cc299 Revert "Remove base/mac/scoped_dispatch_object.h"
This reverts commit c22cb7957d.

Reason for revert: breaks libfuzzer mac asan bot

https://ci.chromium.org/ui/p/chromium/builders/ci/Libfuzzer%20Upload%20Mac%20ASan/82742/overview

Fixed: 1445156

Original change's description:
> Remove base/mac/scoped_dispatch_object.h
>
> In ARC, dispatch objects are Objective-C objects and need to be
> managed as such.
>
> See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
> for information about this conversion.
>
> Bug: 1280317
> Change-Id: I5db820ac85bd9aad54feab951c408c3e7785cb95
> Include-Ci-Only-Tests: true
> Validate-Test-Flakiness: skip
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4519014
> Reviewed-by: Chris Hamilton <chrisha@chromium.org>
> Owners-Override: Avi Drissman <avi@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1143321}

Bug: 1280317
Change-Id: I1363a4d7658a85d15bab4dbd0e5185a1fb8a09ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4527975
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1143412}
2023-05-12 18:19:32 +00:00
c22cb7957d Remove base/mac/scoped_dispatch_object.h
In ARC, dispatch objects are Objective-C objects and need to be
managed as such.

See https://chromium.googlesource.com/chromium/src/+/main/docs/mac/arc.md
for information about this conversion.

Bug: 1280317
Change-Id: I5db820ac85bd9aad54feab951c408c3e7785cb95
Include-Ci-Only-Tests: true
Validate-Test-Flakiness: skip
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4519014
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1143321}
2023-05-12 16:43:09 +00:00
e6f5092506 [Code Health] Remove expired Discarding.WinOSPressureSignals hists
Removed the following expired histograms:
LowMemorySessionLength
PressureLevelOnLowMemoryNotification
AvailableMemoryMbOnLowMemoryNotification

Bug: 1384818
Change-Id: I4677d6f9d7225923e1887bea3ce0e198353e04d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4414902
Commit-Queue: Sergii Bykov <sbykov@google.com>
Reviewed-by: Dana Fried <dfried@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1129151}
2023-04-12 09:37:21 +00:00
a601992c3d Do not include base/base_export.h from outside of base.
Bug: None

Change-Id: I08c9c73ebfa902061cc380272ed27256b5b7f9aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375120
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122532}
2023-03-27 18:12:42 +00:00
19e2851b2e [MacOS] Repeat memory pressure signal
This is mostly how the signal works on other desktop platforms since
they work by polling the memory state rather than receiving a
notification from the OS.

Done behind a feature flag as this will have a major impact on how
memory pressure will be handled on MacOS.

Bug: 1417298
Change-Id: I23b443896990b548053e36f5df801da6fcbffc54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4250339
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108603}
2023-02-22 22:06:08 +00:00
216bbdc312 [base] Remove MemoryPressureMonitor::SetDispatchCallback
In practice, SetDispatchCallback() was only used in the
MultiSourceMemoryPressureMonitor implementation. This CL removes that
method from the base class so that it becomes specific to
MultiSourceMemoryPressureMonitor.

In addition, this CL renames SetDispatchCallback() to
SetDispatchCallbackForTesting() as it is only used in unit tests.

Bug: None
Change-Id: If17e319e9cb11a80731115bc0d0e8c368493fa28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209171
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1107036}
2023-02-17 22:27:00 +00:00
114b79ba45 Record the amount of available physical memory periodically on Windows.
The goal is to verify whether the assumptions here
https://source.chromium.org/chromium/chromium/src/+/main:components/memory_pressure/system_memory_pressure_evaluator_win.cc;l=104-111;drc=12be03159fe22cd4ef291e9561762531c2589539
are still correct on latest Windows versions.

Change-Id: I1195a346bb412a69f799304f8692a8f9df41506e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4200608
Auto-Submit: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Olivier Li <olivierli@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1106121}
2023-02-16 10:03:32 +00:00
b6bb5f6ed0 Remove MultiSourceMemoryPressureMonitor::ResetSystemEvaluatorForTesting
ResetSystemEvaluatorForTesting() was only ever called after the
constructor, which meant it had no effect. This has been true since
crrev.com/c/1836019 landed.

Bug: None
Change-Id: I18bc51d27eec6577244233a5430149e0659e8186
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4247838
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Brian Geffon <bgeffon@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105827}
2023-02-15 20:12:19 +00:00
54aa31e273 [fuchsia] Use _hlcpp targets for linking to fidl libraries
This is in preparation for adding support for unified bindings.
At that point there will be subsets of bindings available with
various suffixes, and the unprefixed target will only be used
for fidl_library targets to depend on each other.

Bug: 1351487
AX-Relnotes: n/a. Not user visibile.
Change-Id: I9997e2ebc8f78c4a11f2a5479eeff94e197ff44f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209851
Owners-Override: Wez <wez@chromium.org>
Commit-Queue: Bryant Chandler <bryantchandler@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1102308}
2023-02-07 19:20:26 +00:00
760543d1ba Build SystemMemoryPressure for iOS.
- Enable the mac system memory pressure for iOS. The same implementation
can be used.

Bug: 1411704
Change-Id: I45f87a122d160f2de76e6ab30d4939bcde4212bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4214668
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100153}
2023-02-01 23:30:10 +00:00
12be03159f Update header includes for /base/functional in /components
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I3179c6b5879e1e2d5a5f4990484b9a85f8548809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4152595
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091229}
2023-01-11 09:16:09 +00:00
e672a665ff task posting v3: remove includes of runner handles and IWYU task runners
Turns out there's a lot of includes, so these will have to be removed
before deleting the implementation of the task runner handles.

To allow the deletion of the task runner handle headers, add
the sequenced/thread task runner handles where they are used in
the codebase with scripts.

This was done with an automated change, with a few touchups afterwards.
The code for the mass-refactor changes are here:
python:
https://paste.googleplex.com/5534570878337024
shell:
https://paste.googleplex.com/6466750748033024

In terms of touchups:
- add sequenced/thread task runner handles to
  the third_party/blink/public/DEPS, because multiple files were using
  it transitively anyways.
- rewrite certain parts of the codebase which used
  ThreadTaskRunnerHandles instead of CurrentDefaultHandles.
- fix a compile issue with forward-declaration in
  extensions/browser/extension_file_task_runner.h.

AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I737ef32aee4e77c21eaa3a2bdc403a28322cf1b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133323
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090532}
2023-01-09 21:42:28 +00:00
9a0a4140ce win7dep: remove win7/8 code from components
Also removes calls to WindowsVersionSupportsSpellchecker() since that
is now always true.

Bug: 1385856
Change-Id: I22e00a6552b23543bd695eb030bba202ec98d6d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4127097
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1087372}
2022-12-28 18:26:21 +00:00
52fa5a7f26 task posting v3: moving away from SequencedTaskRunnerHandle
To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5302682490241024

This will do a few sed-like modifications, changing calls to methods of
SequencedTaskRunnerHandle to calls to methods of
SequencedTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: I49e50a2bd1e78b00e7c067219fff96d2e0bc0b46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3983373
Commit-Queue: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1071032}
2022-11-14 15:53:25 +00:00
d4b0b5fa05 Remove unnecessary weak_ptr.h includes in //components headers.
Files that do not reference "WeakPtr" have no need for weak_ptr.h. Then
fix files that are missing includes.

Bug: 242216
Change-Id: I160d2a406264fb8f91e99920b1d57469fc759435
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4018053
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1069840}
2022-11-10 17:33:21 +00:00
d3e13fda57 Make chrisha@ an emeritus owner of components/memory_pressure/.
chrisha@ is no longer an active Chromium contributor but still has
enough context to do code reviews.

Change-Id: I15fac2adc63464ae71f5dcd36d171d49d1940208
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3946900
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Auto-Submit: Owners Cleanup <swarming-tasks@owners-cleanup-prod.google.com.iam.gserviceaccount.com>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1058692}
2022-10-13 14:26:20 +00:00
addbea082a Use helper macros to define base::Features in //components/memory_pressure
This allows:
- features to be defined with a consistent set of qualifiers, and for
  that set of qualifiers to be updated over time as appropriate.
- better PRESUBMIT checks to ensure that base::Features are not defined
  in headers.
- simplifies things for scripts trying to extract feature definitions
  out of C++ code.

The primary CL was generated using a script that automatically rewrites
base::Feature declarations and definitions to the macro form. Changes to
any files with known incompatibilities with the macros (base::Features
without static storage duration and base::Features declared as static
class members) were then fully reverted; those changes will be manually
handled in followups.

This CL was uploaded by git cl split.

R=chrisha@chromium.org

Bug: 1364289
Change-Id: I6fc44bb3b3f3093f32f5c39a1b4f239bf7b038e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3916733
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1051990}
2022-09-27 19:39:03 +00:00
8ba1bad80d Update copyright headers in components/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: If6a3370b0b2849d889ce797596fe1ccbad2f3fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891619
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046502}
2022-09-13 19:22:36 +00:00
c45f85ff1c Various code cleanups for obsolete macOSes
Bug: none
Change-Id: I486bcc938220c7520503df138b26ec5a56caf7ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3629986
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001748}
2022-05-10 22:07:02 +00:00
ac45d06057 Make it more obvious that the process will terminate resulting from this issue.
Makes the log message much more useful while debugging flakes.

Change-Id: I774a695f0a4fac2fbfdb5020b786deba31622168
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3621445
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Auto-Submit: Filip Filmar <fmil@google.com>
Cr-Commit-Position: refs/heads/main@{#1001600}
2022-05-10 17:56:42 +00:00
bdd68018e8 [base] Remove unused post_task.h includes
This CL is a no-op.

Bug: 1026641
AX-Relnotes: n/a
Change-Id: If45d30e748b65097bb6be666dc305c27183d83ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3555247
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Owners-Override: Francois Pierre Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987328}
2022-03-31 04:00:05 +00:00
d87f10f467 [base] IWYU for base::Time
This CL is a no-op.

Only fixing instances where base::Time (and Ticks/Delta) is used in
a statement (i.e. not as a parameter to avoid adding includes in mere
overrides). Skipping pointer and reference qualified instances.

i.e. matches this regex:
'(\n *[^/\n][^/\n][^/\n]*base::(Time|Thread)(Ticks|Delta)?\b[^*&][^)]*;)'

and skipping files that have any existing fwd-decl for any of the
variants.

This is a prereq to remove unused base/task/post_task.h includes in
https://chromium-review.googlesource.com/c/chromium/src/+/3555247

Bug: 1026641
Change-Id: I87b43a8dc92bdceb67f4bd59b327b54813aa72a6
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557354
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987283}
2022-03-31 00:44:22 +00:00
a47d5c6da7 Remove unused include in //base/sequence_checker.h
Fixed: 1288836
Change-Id: I95f0e0944144dd5947e546f2ec0db17811ab8a64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3392467
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#962291}
2022-01-23 03:48:48 +00:00
bca91f9c4a components: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

Bug: 1234043
Test: No functionality change
Change-Id: I0b8d92c2fe79a3904bcb2d22f12032424e32d576
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3391443
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959660}
2022-01-15 19:56:21 +00:00
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945735}
2021-11-27 09:25:52 +00:00
b9e2c27ca6 Remove unused "base/macros.h" in components/
Removes `#include "base/macros.h"` from files in components/ that do not
contain `ignore_result(`.

Bug: 1010217
Change-Id: Ic1ea0c59d63652bc896e80638a7ff919c872f1c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3275012
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940666}
2021-11-11 05:31:49 +00:00
6ddeef3c89 [fuchsia] Fixes death test output to match new message.
Bug: 1263618, fuchsia:60820
Change-Id: I1c9af170b22226fd57bb9612994f20250f0bdb3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3246154
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Rohan Pavone <rohpavone@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935743}
2021-10-28 07:02:25 +00:00
Wez
f1e023ebc1 [fuchsia] Exit process when services fail, rather than crashing
Bug: fuchsia:60820
Change-Id: Ibe0d662e1daa515200c2438dee237f96833e7718
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226174
Auto-Submit: Wez <wez@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#934874}
2021-10-26 08:42:58 +00:00
643cdf6190 Replace base/task/ temporary forward headers with their final locations
Note to QA: This merely changes includes and should not be blamed
for files it touched.

Bug: 1255932
Change-Id: I1ce4e31efd5792ebf2080812e665cae838a54972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3226943
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932153}
2021-10-15 19:13:42 +00:00
3d7d70920a Replace task-related headers to their equivalent in base/task/
This CL was generated by using tools/git/move_source_file.py to change
the includes for those files:
base/bind_post_task.h
base/deferred_sequenced_task_runner.h
base/post_task_and_reply_with_result_internal.h
base/sequenced_task_runner.h
base/sequenced_task_runner_helpers.h
base/single_thread_task_runner.h
base/task_runner.h
base/task_runner_util.h
base/updateable_sequenced_task_runner.h

Then formatted using "git cl format". DEPS files were fixed with a
simple search and replace script.

Bug: 1255932
Change-Id: I0d9b5ddd9260fde5e4581e6c6e0080bdb0ed2c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3209175
Reviewed-by: Gabriel Charette <gab@chromium.org>
Owners-Override: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929867}
2021-10-08 20:27:23 +00:00
e5a38eddbd Migrate "base::TimeDelta::FromX" to "base:X".
All changes were done automatically with git grep, sed, xargs, etc.

No-Presubmit: true
No-Try: true
Bug: 1243777
Change-Id: I7cc197e9027f7837cd36afc67a209079f85ec364
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198824
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927512}
2021-10-02 03:06:35 +00:00
60d275e268 Remove sebmarchand@chromium.org from components/memory_pressure/OWNERS
This is an automatically generated changelist based on group memberships and affiliations, with some transition delay.

To approve this change, CR+1/2 this change and submit. To reject this change, CR -1 this change, and the bot will abandon the change.

To report an issue, file a bug in the Infra>Security component.

Change-Id: I737a493e9cb75b41781435157e3bdd215ae00c4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3144097
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Auto-Submit: Owners Cleanup <swarming-tasks@owners-cleanup-prod.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#919237}
2021-09-08 13:53:03 +00:00
23183a1bef Move //util/memory_pressure to //components
This is the last part of merging all of //base/util back into //base.

It also removes //base/util.

Bug: 1227210
Change-Id: Ia06e30d7d1963b7c657e0bb5047849ebe1b9f24e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3053510
Commit-Queue: Albert J. Wong <ajwong@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Albert J. Wong <ajwong@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#911582}
2021-08-13 00:23:35 +00:00