0
Commit Graph

19 Commits

Author SHA1 Message Date
Emily Andrews
2677e32f02 Move Service Process Host files to a separate folder
This change moves service process host code into its own service_host
folder.

This change should modify no functionality.

Bug: 41493609
Change-Id: I5b760717dc42340921bf7d6699c147baa2772cf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089368
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Commit-Queue: Emily Andrews <emiled@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1424005}
2025-02-24 10:37:05 -08:00
Georg Neis
35ff854b7e Remove Lacros leftovers from content/browser, part 2
Main changes:
- Replace IS_CHROMEOS_ASH with the equivalent IS_CHROMEOS
- Remove obsolete build flag includes/dependencies

Bug: b:354842935
AX-Relnotes: n/a.
Change-Id: I079b003a4664a7a3f7281905323611b6fc4fe3da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090635
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397108}
2024-12-16 18:02:08 -08:00
Kevin McNee
75cd759255 Use NOT_TAIL_CALLED for Thread::Run
This attribute allows us to make the intent of the callers explicit. We
also have the callers use the NO_CODE_FOLDING macro.

This was previously attempted in this CL
https://chromium-review.googlesource.com/c/chromium/src/+/2673704
which was abandoned due to a lack of compiler support for
NOT_TAIL_CALLED with virtual functions. Newer versions of clang allow
this. See the difference between
https://releases.llvm.org/12.0.0/tools/clang/docs/AttributeReference.html#not-tail-called
and
https://releases.llvm.org/13.0.0/tools/clang/docs/AttributeReference.html#not-tail-called

Bug: 40165341
Change-Id: I3e49a6855c844bf1ef1bc59b002a876084c788dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5626804
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Ali Juma <ajuma@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1316516}
2024-06-18 16:45:23 +00:00
Kevin McNee
0b33e66c41 Remove some supporting code for NotificationService
There is only one remaining use of NotificationService which is
pending removal [1]. In the meantime, we can start removing
supporting code for NotificationService which is not needed for this
remaining case.

In particular:
- Remove checks for a non-null NotificationService in code that
  otherwise doesn't use it.
- NotificationService is no longer used on the IO thread, so we no
  longer create one there.
- Move code that no longer needs to be in content public into the
  content Impl classes.
- Remove code that's dead and trivial to remove or code that can be
  defaulted by the compiler.

Note that some NotificationService functionality is now essentially
dead code outside of unit tests, but this CL leaves the core
implementation alone, given that's it's just going to be deleted
entirely.

[1] b/301214499

Bug: 40327896
Change-Id: Id70b6ead574d401f63b4d20b845b1c6e96b3b575
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5622038
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1314368}
2024-06-13 00:36:03 +00:00
Minoru Chikamune
8678f5133e [CodeHealth] Remove expired NetworkService.ShutdownTime histogram
As a part of the CodeHealthRotation, this CL removes the expired
histograms.

OBSOLETE_HISTOGRAM[NetworkService.ShutdownTime]=The histogram was expired as of M85.

Bug: 1499454
Change-Id: I0af35f7aa43ce52a6eb609329e86ff282839ed5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5039245
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1227150}
2023-11-21 01:12:33 +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
Will Harris
cd57b83d9f Move ChildProcessHost* from content/common to content/browser
This is a prerequisite for moving a browser-only API that is
used by ChildProcessHostImpl from common to browser.

BUG=1402942

Change-Id: I6eea0952e6bf1ef30498b6f465067e599ea0ff53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4134795
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Owners-Override: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089401}
2023-01-05 20:03:10 +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
Matt Menke
1d99e667c7 Delete URLFetcher.
It's left over from when the network service was run in the browser
process, but that's no longer the case. All consumers have now been
migrated, so we can at at last delete it.

Bug: 1010491
Change-Id: I5191cb715e70c64eb865d3309ac31fcb02b8a081
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3702852
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1015073}
2022-06-16 20:17:45 +00:00
John Abd-El-Malek
0a1fa3181d Remove code for experimenting with running on big cores.
Bug: 1257237
Change-Id: I48c61f70401f8e8c1181cf985f15fe97b43eac4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3658209
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1007076}
2022-05-24 21:44:46 +00:00
Xiaohan Wang
1ecfd006fd content: 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).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ia0eae6f9396065e190929d42600012c9324c07e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3399774
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Owners-Override: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
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@{#961157}
2022-01-19 22:33:10 +00:00
Erik Chen
61480e24ef Revert "lacros: Wait 1 second for network process termination."
This reverts commit 16850370cb.

Reason for revert: On suspicion of causing deterministics failures in https://ci.chromium.org/p/chrome/builders/ci/lacros-amd64-generic-chrome?limit=200

Original change's description:
> lacros: Wait 1 second for network process termination.
>
> This CL modifies Lacros to use the same configuration as Ash, since ash
> shutdown will also trigger lacros shutdown.
>
> Bug: 1235874
> Change-Id: I21c4d572356281750d3becfc0d6000ff5d7db63e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3269049
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Erik Chen <erikchen@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#941782}

Bug: 1235874
Change-Id: I35dae5c4d3d6f65315f57e1ccc379db8f7bba143
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3285941
Owners-Override: Mohsen Izadi <mohsen@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942380}
2021-11-17 00:57:22 +00:00
Erik Chen
16850370cb lacros: Wait 1 second for network process termination.
This CL modifies Lacros to use the same configuration as Ash, since ash
shutdown will also trigger lacros shutdown.

Bug: 1235874
Change-Id: I21c4d572356281750d3becfc0d6000ff5d7db63e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3269049
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941782}
2021-11-15 19:36:54 +00:00
John Abd-El-Malek
7d7b8e3066 Set CPU affinity every 15s if it's specified for a thread.
If the browser goes to background and back this will be reset. This cl doesn't yet handle setting the affinity to default value when the browser or renderer is in the background.

Bug: 1257237
Change-Id: I5cbdf4f6518d8d73acfe0aa3fcc1125b7428201b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3230003
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#932761}
2021-10-19 00:11:17 +00:00
John Abd-El-Malek
2ded1eb656 Initial code for experimenting with running some threads on big cores.
Finch will be used to determine which threads run on big or bigger
cores. There's no logic yet to do this for just foreground renderers or
apps; the intent is to first gather data on what is the biggest
performance benefit this could yield along with the corresponding
worst-case power drain. The other purpose is to see how the numbers from
the field compare to what we see on Pinpoint.

Bug: 1257237

Change-Id: I5ddf996c8a4797c7787549a405c4c91e65e705c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3216304
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/main@{#931674}
2021-10-14 20:06:41 +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
John Abd-El-Malek
b09daeecd3 More simplifications in content now that ProcessHostOnUI is the only path.
Bug: 904556
Change-Id: I811629156a2cc24d55e7f859d8881639dc8e4431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3176490
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924315}
2021-09-23 15:29:34 +00:00
Ken Rockot
9836cfb755 Remove legacy IPC Channel for utility processes
This modifies Browser/ChildProcessHost and ChildThreadImpl to support
child processes which never establish a legacy IPC Channel, and
modifies UtilityProcessHost and UtilityThreadImpl to take advantage of
this.

This makes utility processes the first type of process to be completely
free of legacy IPC. GPU processes can follow shortly hereafter.

To facilitate this change, a few other details are modified here:

- BrowserChildProcessObserver no longer exposes a separate
  BrowserProcessHostConnected event. The only two consumers are
  migrated to BrowserChildProcessLaunchedAndConnected. This avoids
  potential re-entrancy issues when launching a process, since any
  hosts not using legacy IPC are considered to be connected
  synchronously as soon as launch is started.

- Browser/ChildProcessHost no longer acknowledges the PID received
  from the child process in IPC::Listener::OnChannelConnected,
  instead using the PID exposed directly from the
  ChildProcessLauncher. This is consistent whether or not the
  host creates a legacy IPC channel.

Bug: 616980, 993189
Change-Id: I881db61db335b70b658fe0dbf0c149703e7219e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2959467
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#893209}
2021-06-16 23:16:02 +00:00
John Abd-El-Malek
f3243dc72e Rename BrowserProcessSubThread to BrowserProcessIOThread to make it clear what it's used for now.
We don't create it in production anymore for UI thread. This wasn't obvious, e.g. see the fix in https://crrev.com/c/2877684.

Bug: 904556
Change-Id: I4e6eaeeafd6144c30c4822a11806dfa24e4363e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2878894
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880433}
2021-05-07 16:20:01 +00:00