0
Commit Graph

103 Commits

Author SHA1 Message Date
Marja Hölttä
bb62d3105a [local compile hints] Fix the WebCore.Scripts.V8CompileHintsStatus histogram
1) The histogram needs a "no compile hints" option to be able to
estimate e.g., how frequently the code cache is hit

2) The "produce compile hints, module, no streaming" bucket was
overcounted

Bug: b/40286622
Change-Id: I4ba0671aff44bd263e64034b18aace8b552d0c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5344415
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1270649}
2024-03-09 21:14:24 +00:00
Hiroshige Hayashizaki
b5e8a122c9 Remove redundant content:: for GetUIThreadTaskRunner/BrowserTaskType
Follow-up of
https://chromium-review.googlesource.com/c/chromium/src/+/5276439/comment/7e9833fe_c465c594/

AX-Relnotes: n/a.
Bug: 1403746
Change-Id: Ia7d838385677d350b803a855271182358acb1468
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5314820
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1265192}
2024-02-26 14:44:07 +00:00
Takuto Ikuta
a47d7859c4 autofill: remove unnecessary include from browser_test_base.h
This is extracted from https://crrev.com/c/5280997 to reduce compile
time of some test files.

content/public/test/browser_test_base.h is the file removing
unnecessary header.

Bug: b/324519459
Change-Id: Ic6b8e4328f6be3161dd3f09711451c8578032ef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5300036
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262233}
2024-02-19 03:46:58 +00:00
Eva Herencsarova
3825de6fe0 Reland "[wasm] Add wasm module caching for extensions with streaming instantiation"
This is a reland of commit 90af84e33e.

Browsertest improvements:
- In the JS code of the extension, Wasm functions are called until all of them are optimised. In this change, once in a while we yield to the event loop by calling setTimeout().
- The flag "--wasm-tiering-budget" is set to 10 so that the optimised, TurboFan code is created right away.
- As it's not clear when the caching exactly happens, the test keeps opening new tabs (which triggers the execution of the JS code in the extension) and waiting until there is a cache hit. This makes the test more robust if the caching happens a bit later.
- Previously the test waited to see x hits and y misses after x+y loads of the extension. Now the test waits for x+y samples. This way we get an accurate error message if there is an issue and don't run into timeouts.
- Added logging for easier future debugging.

Original change's description:
> [wasm] Add wasm module caching for extensions with streaming
> instantiation
>
> Bug: v8:14518
> Change-Id: I896f85284d02feb089e095b8a925bd451bfee85e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5117546
> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
> Commit-Queue: Eva Herencsárová <evih@chromium.org>
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1256324}

Bug: v8:14518
Change-Id: I4ee455cf97cbf140d32a0ab1abcf3b2054ba750c
Cq-Include-Trybots: luci.chromium.try:linux_chromium_chromeos_msan_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5268792
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Eva Herencsárová <evih@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258421}
2024-02-09 09:56:06 +00:00
Kevin Grosu
ca2e0f01d4 Revert "[wasm] Add wasm module caching for extensions with streaming"
This reverts commit 90af84e33e.

Reason for revert: Added test is failing: https://ci.chromium.org/ui/test/chromium/ninja%3A%2F%2Fchrome%2Ftest%3Abrowser_tests%2FWasmExtensionCachingBrowserTest.CacheWasmExtensions?q=VHASH%3A5fcd6134c5b57ed5

Original change's description:
> [wasm] Add wasm module caching for extensions with streaming
> instantiation
>
> Bug: v8:14518
> Change-Id: I896f85284d02feb089e095b8a925bd451bfee85e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5117546
> Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
> Commit-Queue: Eva Herencsárová <evih@chromium.org>
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1256324}

Bug: v8:14518
Change-Id: I66ac01c68f337543ff6d362720e84716d9df33fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5270296
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Kevin Grosu <kgrosu@google.com>
Owners-Override: Kevin Grosu <kgrosu@google.com>
Cr-Commit-Position: refs/heads/main@{#1256463}
2024-02-05 22:57:09 +00:00
Eva Herencsarova
90af84e33e [wasm] Add wasm module caching for extensions with streaming
instantiation

Bug: v8:14518
Change-Id: I896f85284d02feb089e095b8a925bd451bfee85e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5117546
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Eva Herencsárová <evih@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1256324}
2024-02-05 18:50:58 +00:00
Tom Sepez
80e9e6e546 Avoid two-arg base::HexEncode() and RandBytes() calls.
Force the compiler to deduce the correct size, thus vastly
simplifying the code.

-- fix else-after-return as noticed.

Change-Id: I50a5c3387e0ec7693e1d9a4f72f03e2a980e01da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5241357
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1254884}
2024-02-01 02:34:42 +00:00
Arthur Sonzogni
c686e8f4fd Rename {absl => std}::optional in //content/
Automated patch, intended to be effectively a no-op.

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

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 "^content" \
    | sort \
    | uniq \
    | grep \
      -e "\.h" \
      -e "\.cc" \
      -e "\.mm" \
      -e "\.py" \
    | 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>"
git cl format
```

# Skipping unrelated "check_network_annotation" errors.
NOTRY=True

Bug: chromium:1500249
Change-Id: Icfd31a71d8faf63a2e8d5401127e7ee74cc1c413
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5185537
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1245739}
2024-01-11 08:36:37 +00:00
Marja Hölttä
ac53a59da7 [local compile hints] Add tests
The added content browsertest ensures that we produce and consume
local compile hints when running scripts.

To enable testing, this CL adds a capacity for making
InteractiveDetector ignore FCP - this is because the first paint never
happens in a content browser test, so without this the page would
never be detected as interactive.

Bug: chromium:1495723
Change-Id: Iceffed1244fbe4aa9048812653fd2874b59c703d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5024173
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1237944}
2023-12-15 06:45:47 +00:00
Tsuyoshi Horo
9872a4fed0 Run CodeCacheBrowserTest with BackgroundResourceFetch feature disabled
This cl makes CodeCacheBrowserTest run with BackgroundResourceFetch
feature disabled even when we will enable BackgroundResourceFetch
feature enabled by default.

Bug: 1379780
Change-Id: Ia48bff7b757f41a0068af3cbd88dd4c123a164bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5004282
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1221432}
2023-11-08 09:25:25 +00:00
Tsuyoshi Horo
c04d12e2a5 Support loading code cache on a background thread
This CL introduces BackgroundCodeCacheHost class which is created in the
main thread, and passed to the background thread to load code cache on
the background thread.

This CL only has an effect if the BackgroundResourceFetch feature is
enabled.

Bug: 1379780
Change-Id: Iaf7c4adfbf6ab7fc035acfabe4bea9ce65a1de13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4982988
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1218594}
2023-11-02 01:49:26 +00:00
Jagadesh P
d8dad714af [DanglingPointer] Remove dangling pointer in GeneratedCodeCache Test.
Bug: 1485837
Change-Id: I6c49c6df8445ece9ef4779b918e23bdfeb8a5c1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4975327
Commit-Queue: Bo Liu <boliu@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216122}
2023-10-27 15:12:41 +00:00
Arthur Sonzogni
bdeca8e234 Privatize content features.
There are two headers to declare features in content.
- the public one: `content/public/common/content_features.h`
- the private one: `content/common/features.h`.

Unfortunately, most are declared in the public one, despite being used
privately exclusively. This violate the `content/public/` rules. This
patches provides a fix.

Parts of this patch was made programmatically using this script:
https://paste.googleplex.com/6699322946093056, with the following
output: https://paste.googleplex.com/5591288895242240

This patch:
1. Update `docs/how_to_add_your_feature_flag.md` to incentive
   developers to the non public versions.
2. Move ~70 features back into the private version.
3. Programmatically update the includes to include the correct
   #include header(s).
4. For consistency and minimizing the amount of files modified,
   the two headers to use the `features::` namespace.

AX-Relnotes: n/a.
Change-Id: Id9126a95dfbc533d4778b188b659b5acc9b3d9e3
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4836057
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194718}
2023-09-11 08:32:12 +00:00
Arthur Sonzogni
e98d214c48 DanglingPointer: annotate for unittests base+linux [1/N]
The DanglingPointerDetector is configured only when the test enters the
ContentMain function. See https://crbug.com/1400059

I would like to configure it no matter the kind of test. For this to
happen, we need to annotate every pre-existing dangling pointers.

This patch annotates the ones you can find by running targets depending
on the GoogleTest library.

Statistic:

This adds 1776 new DanglingUntriaged. Among them:
- 1288 are in unittests.
- 488 are in implementation.

To produce those numbers, I used the command:
```bash
git diff annotate-linux origin/main -- "*test*" | grep "DanglingUntriaged" | wc -l
```

This patch has been generated by:

1. Apply the "auto-annotator" patch:
   https://chromium-review.googlesource.com/c/chromium/src/+/4474553

2. Compile the compiler again:
   ```bash
   ./tools/clang/scripts/build.py
   ```

3. List and run all the targets. You can use a bash script like:
   https://docs.google.com/document/d/1AMMERcqy0eafFWopUCHYsIKIKEp3J8DFxqW9UIbzIHo

4. Concatenate output, filter by "Found dangling ptr", sort, remove
   duplicate.

5. Apply the rewriter script from:
   https://github.com/ArthurSonzogni/chrome-dangling-ptr-apply-edit

6. Revert the "auto-annotate" patch.

7. Apply `git cl format`

AX-Relnotes: n/a.
Bug: chromium:1400059
Change-Id: I217d5c0b925da5176fc53baf95919a3690f1e9a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4570424
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1151859}
2023-06-01 15:02:25 +00:00
Andrew Williams
341a668163 [Generated Code Cache] Add test for partitioning by NIK
Adds one test for frame contexts, and another that we can use
to test generated code cache usage by shared workers if that gets
implemented at some point.

Bug: 964467, 1445719
Change-Id: I822e7115ffadee15baea5082a7b1c01041248ea0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4554196
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1149679}
2023-05-26 12:48:58 +00:00
Teresa Mao
98cb05ab89 Add histograms for better measuring feature adoption
- WebUICodeCache.FeatureEnabled increments when generated code cache for WebUI JS is instantiated.
- SiteIsolatedCodeCache.JS.WebUI.Behaviour logs caching behavior (clear/create/hit/miss/update) for WebUI JS scripts only.

Bug: None
Change-Id: Iba1e0fed76c686ced917345a3b7a8131c20132e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4420273
Reviewed-by: Sophie Chang <sophiechang@chromium.org>
Commit-Queue: Teresa Mao <temao@chromium.org>
Reviewed-by: Thomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1139149}
2023-05-03 21:29:01 +00:00
Andrew Williams
d5fa8ad0e1 Have the Code Cache use the NIK when the HTTP Cache does
This CL updates the Code Cache to use the NIK when the
HTTP Cache does (which isn't only when
kSplitCacheByNetworkIsolationKey is enabled, as it once
was).

This is implemented behind it's own feature flag so that
it could be enabled via a slow rollout or as a killswitch.

For more context, see:
https://bugs.chromium.org/p/chromium/issues/detail?id=1213818#c30

Bug: 1213818
Change-Id: Iece67fb7f34269d1f1586de7854dc7526e50e7a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4303800
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Andrew Williams <awillia@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1120187}
2023-03-21 21:15:43 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
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: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Sean Maher
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
Clark DuVall
d4d0f454f9 Clean up launched features from CombinedNavigationOptimizations
These have been enabled by default for awhile and it should be safe to
clean up the old code now.

Bug: 1309246
Change-Id: I6f97fd2dc5e5135b3682916f6bfcc3deb37669cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4021617
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Ayu Ishii <ayui@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1071506}
2022-11-15 09:31:20 +00:00
Sean Maher
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
Avi Drissman
4e1b7bc33d Update copyright headers in content/
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: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
Nico Weber
bb340f66aa Fix invalid constexpr enum operations that clang will soon flag
constexpr enum expressions for enums without fixed underlying type must
now be in the range of the enum type.

The biggest change is that the 3-arg form of UMA_HISTOGRAM_ENUMERATION now
requires its enum arg to have a fixed underlying type (see bug for details),
so add a whole bunch of underlying types.

Fix other issues by slightly reordering arithmetic, or by making some
values const instead of constexpr.

No intended behavior change.

Bug: 1348574
Change-Id: I59d06a095c20ec1c2a5eea5928c73793f89856ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3796909
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030177}
2022-08-01 18:00:54 +00:00
Matt Menke
11ffd53213 Make HttpCache::GenerateCacheKey() return an absl::optional.
When including a NetworkIsolationKey in the cache key, and the
NetworkIsolationKey is transient, return absl::nullopt. Previously it
would return an empty string, which would cause cross-site leaks if it
were ever actually used as a cache key.

Also make NetworkIsolationKey::ToString() return an optional, and return
nullopt if transient, for the exact same reason.  Rename ToString() to
ToCacheString(), since DCHECK_EQ(nik, nik) expects ToString() to return
a std::string. Also Migrate those DCHECK_EQs to DCHECK(nik==nik).

Bug: None
Change-Id: I4c7f9a2ff16755aff8d5a7590eb8877a16d3611e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3777742
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1027064}
2022-07-22 00:49:33 +00:00
Yutaka Hirano
b1597eda0c Plumb max_size_bytes to SimpleLruCache
This fixes unittests with enabling kInMemoryCodeCache.

Bug: 1324058
Change-Id: Ia2f07e7b076dc1961a092131421db18726ddcac4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3775360
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1026327}
2022-07-20 18:21:18 +00:00
Yutaka Hirano
2db0b4f467 Add cache clear support for in-memory code cache
Bug: 1324058
Change-Id: Ice2cc1230b3edf290b8fb02bf565aa43fd40af7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3774641
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1026246}
2022-07-20 14:59:54 +00:00
Yutaka Hirano
f38f7e51cb Implement in-memory code cache
Implement a simple in-memory code cache behind a feature flag in order
to see its potential performance gain.

Bug: 1324058
Change-Id: Ia60b245759fa7e78fe1eee529b24b6a4ea5b991e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3759056
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1024572}
2022-07-15 03:57:58 +00:00
Yutaka Hirano
0d4be98470 Rename SimpleLruCacheIndex
As we're going to store actual contents, SimpleLruCacheIndex is no more the right name for the class - let's rename it.

Bug: 1324058
Change-Id: I869796f77af57638ca40cb264c6204cb790c1b6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3755954
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1024523}
2022-07-15 01:02:21 +00:00
Maks Orlovich
2690c357b0 disk_cache: Cleanup CreateCacheBacked API
This is the last remaining method in disk_cache.h that takes an out pointer while being able to execute both synchronously and asynchronously, which requires highly error-prone lifetime management of the destination.

The changed version simply produces a unique_ptr by value, either as return value or via callback.

HttpCache::GetBackend still has a similar issue, but it would be too much to handle in this one CL, and it's also different in that it's not a factory method, and both the callback invocation and lifetime of the disk_cache::Backend it returns are tied to the underlying HttpCache, so it likely needs a different solution (like it reporting success/failure, and users using HttpCache::GetCurrentBackend to make the lifetime dependency obvious).

Bug: 854716
Change-Id: I79807021c74ffadbe0acd62145345f887626f1fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688361
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1017654}
2022-06-24 15:48:44 +00:00
Yutaka Hirano
566097c362 Small fixes on SimpleLruCacheIndex
1. Take key string length into account. This may lead to fewer entries
   in the index and less memory use.
2. Ignore too large entries.
3. Have a smaller capacity, based on the UMA numbers. Rename the
   histogram as this change drastically changes the distribution.

Bug: 1336615
Change-Id: I6a30f8a0648845180e9c342feef3479704565322
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3715914
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1017101}
2022-06-23 10:20:32 +00:00
Yutaka Hirano
09d5d06023 Report the size of the hypothetical code cache periodically
This is a follow-up of https://crrev.com/c/3634940.

Bug: 1324058
Change-Id: I551006f81dc329acf0b972db68ea3652f3c78af1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650113
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1004170}
2022-05-17 09:28:34 +00:00
Yutaka Hirano
3550a8f4b1 Estimate the potential performance impact for memory-backed code cache
Add UMA histograms to measure the potential performance gain.

Change-Id: I3b035137c2b617fe5c944b3c5bf9b8b88458f126
Bug: 1324058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3634940
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1002412}
2022-05-12 01:56:45 +00:00
Gabriel Charette
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
Gabriel Charette
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
Yutaka Hirano
23a5903406 Broker file operations on SimpleCache creation
This change introduces:
- disk_cache::BackendFileOperations and
  disk_cache::BackendFileOperationsFactory to support brokering file
  operations,
- network::mojom::HttpCacheBackendFileOperations to support
  brokering fileoperations via mojo,
- network::MojoBackedFileOperations as a
  disk_cache::BackendFileOperations implementation which uses
  network::mojom::HttpCacheBackendFileOperations in the network service,
- HttpCacheBackendFileOperations (in
  content/browser/net/http_cache_backend_file_operations_factory.h) as
  a network::mojom::HttpCacheBackendFileOperations implementation
- disk_cache::TrivialFileOperations as the trivial
  disk_cache::BackendFileOperations implementation.

This change also replaces file operations needed to create the simple
backend of an HTTP cache in a sandboxed network service running on
Android, and tests that with
SandboxedHttpCacheBrowserTest, CreateSimpleCache.

Change-Id: I93463fbbb0eef640f7095a6d0c47626f38af1856
Bug: 1289542
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3447669
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/main@{#979738}
2022-03-10 13:31:42 +00:00
Christian Dullweber
7723d04836 CodeCache: Reset members on the right thread
The members of GeneratedCodeCacheContext are always accessed on a
specific thread, so they also have to be reset on that thread to avoid
TSAN failures (and potentially real crashes).

Bug: 1298670, 1285414
Change-Id: I273ed08f343844969823fb347992b39518a5437f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3472846
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975706}
2022-02-28 10:13:14 +00:00
Daniel Cheng
ad44af2f53 Migrate base::{size,empty,data} to STL equivalents in //content.
Bug: 1299695
Change-Id: Iefec40ecc9327c04732785eaed5a3214d17e552f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3491685
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975485}
2022-02-26 18:07:54 +00:00
Clark DuVall
4a4314374c Add feature to move code cache and content settings to IO thread
These were previously moved to a background thread as part of the
NavigationThreadingOptimizations feature, which is now enabled by
default. This change will see if moving to the IO thread is any better.
This also makes a small fix to the background thread code, moving these
from USER_VISIBLE to USER_BLOCKING.

Bug: 1187753
Change-Id: I4573a9b53cdc434b5a968f2fdadb6410ea455b39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3379100
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#957583}
2022-01-11 16:28:17 +00:00
Keishi Hattori
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
Peter Boström
1d6a095400 Remove unused "base/macros.h" in content/
Removes `#include "base/macros.h"` from files in content/ that do not
contain `ignore_result(`.

Bug: 1010217
No-Try: true
Change-Id: I887403408704241047e3bd66e953ff7df195368b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274993
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@{#940781}
2021-11-11 16:07:03 +00:00
Peter Boström
9b036533b6 Remove DISALLOW_* macros from content/
This inlines all remaining DISALLOW_* macros in content/. This is done
manually (vim regex + manually finding insertion position).

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: I8b5ea6dd9f8a3f584cf3eef82634017a38b15be8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3193883
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: 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@{#936160}
2021-10-28 23:37:28 +00:00
Peter Kasting
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
Peter Boström
828b902994 Replace DISALLOW_COPY_AND_ASSIGN in content/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
2021-09-21 02:28:43 +00:00
Austin Sullivan
bec3cb1a99 Move BigIOBuffer to storage service
This class is copied in 3 places across //components and //content.

Bug: 1234791
Change-Id: I52a5b4bb6110b61969d465b04e0ea5ed40476cbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3063700
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Austin Sullivan <asully@chromium.org>
Cr-Commit-Position: refs/heads/master@{#909266}
2021-08-06 13:23:33 +00:00
Seth Brenith
ddc5035dd3 Implement code caching for WebUI scripts behind a flag
Design doc:
https://docs.google.com/document/d/1909zoSpNeMogKlmXmRtnSjyuot3YyxU-A_G8Fd4kDhs/edit

The feature is currently disabled by default, and can be enabled by
launching with --enable-features=WebUICodeCache. A subsequent change
will add configuration for a field trial.

Overview of changes (intended to indicate important files, not to
supercede the design document linked above):

1. In content/browser/ and net/, add a new instance of
   GeneratedCodeCache with a new type, so that code cache entries for
   WebUI are further insulated from the open web. This was a security
   recommendation, to limit the chance that any site isolation bug in
   the code caching system could become a privilege escalation.
   Furthermore, disable deduplication within this new instance.
2. In code_cache_host_impl.cc, allow code caching of scripts that were
   loaded via the chrome or chrome-untrusted schemes, if the requesting
   page is also WebUI.
3. In scheme_registry.{h,cc}, and web_security_policy.{h,cc}, create a
   way that we can define what schemes require a hash check when using
   code cache data, because we can't rely on the response time from the
   network cache to tell whether a script has changed.
4. In script_resource.cc, for resources loaded from the schemes
   specified as needing a hash check, set up a
   ScriptCachedMetadataHandler with a flag specifying that a content
   hash is required.
5. In resource_loader.cc, for resources loaded from the schemes
   specified as needing a hash check, ignore the response time and check
   instead whether the Resource has the hash-required flag from step 4.
6. In v8_code_cache.{h,cc}, if the CachedMetadataHandler specifies that
   hash checking is required, then check for hash matches when getting
   data and include the hash when writing data. The tag at the beginning
   of the metadata includes a bit to indicate whether the content hash
   is included.

Bug: chromium:1210399

Change-Id: Ie7c1cbab1516b2240a35aaf9fa0e3ce7871321d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2859703
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908883}
2021-08-05 15:05:45 +00:00
Mythri A
47fcdb57e5 [code cache] Use NetworkIsolationKey for GeneratedCodeCache
Bug: chromium:1213818
Change-Id: I541dde4f7f758b3058bd954f52e3abbdd851b4e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3067072
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908384}
2021-08-04 09:02:58 +00:00
Clark DuVall
f759e796b1 Fix code cache type for WebAssembly cache
This was accidentally switched from WebAssembly to JavaScript in
http://crrev.com/c/3033191.

Bug: 1187753, 1083097
Change-Id: I7b5b2835cdb637e1d94176dd397a014befafed2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3043440
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903991}
2021-07-21 19:15:08 +00:00
Clark DuVall
18d9c29b8f Move GeneratedCodeCache to its own thread to optimize navigation
An analysis of the NavigationStart -> FirstPaint flow showed a
significant amount of time spent fetching the code cache from the
browser process. This blocks the navigation body loader which can lead
to a slowdown of the navigation. It seems the reason fetching the code
cache can take so long is that the browser UI thread is busy, so
scheduling the tasks to get the CodeCacheHost interface from the
BrowserInterfaceBroker and then fetch the cache are getting
significantly delayed.

To fix this, this patch moves GeneratedCodeCache off the UI thread
(partially reverting http://crrev.com/c/1712949), and sends the
CodeCacheHost remote along with the CommitNavigation message, which
eliminates the need to post a task on the UI thread for both getting the
CodeCacheHost interface and fetching the code cache. This had a large
effect on first contentful paint time, especially on Android. This logic
is all behind the "NavigationThreadingOptimizations" feature, and there
should be no change in behavior with the feature disabled. A finch
experiment will be run to see if this has any significant effect on page
load times in the field.

NavigationToFirstContentfulPaint from Pinpoint:
android-go-perf
Amazon: -9.6% https://pinpoint-dot-chromeperf.appspot.com/job/129ab2c1320000
Twitter: -11.4% https://pinpoint-dot-chromeperf.appspot.com/job/12a193de320000

android-pixel2-perf
Amazon: -7.8% https://pinpoint-dot-chromeperf.appspot.com/job/1033158e320000
Twitter: -4.7% https://pinpoint-dot-chromeperf.appspot.com/job/1772681e320000

linux-perf
Baidu: -7.6% https://pinpoint-dot-chromeperf.appspot.com/job/176d2b29320000
Amazon: -2.9% https://pinpoint-dot-chromeperf.appspot.com/job/130233ae320000

Bug: 1187753, 1083097
Change-Id: Ib8402e8db44ec49206835f35fa885d831a69b62c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033191
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903591}
2021-07-20 18:37:57 +00:00
Lei Zhang
524bb5d78b Remove unnecessary includes of span.h from other headers.
Headers that do not reference base::.*span do not need to include
base/containers/span.h.

Bug: 242216
Change-Id: I77c6f8f0cbc6a1688b10d66eb03a5c7a1d95ebf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3021685
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#900709}
2021-07-12 23:37:46 +00:00
Lei Zhang
998100f400 Add various missing STL headers.
https://crrev.com/c/2971087 will effectively remove the base/stl_util.h
include from many files. As a result, those that did not include the STL
headers they use will fail to build. As an early preparation for that
CL, add the missing STL headers.

Change-Id: I6500223f22e07cdcdd3cc0d399dbc5228b0c8ecd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2970614
Reviewed-by: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896119}
2021-06-25 17:58:19 +00:00