0
Commit Graph

9 Commits

Author SHA1 Message Date
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
Emily Andrews
2eab36ae86 Add API to generate a strongly typed ChildProcessId in ChildProcessHost
Using int32_t for the child process id can be fraught with peril.
Developers can mistake this for the PID. Bugs can be created by passing
in an invalid value by mistake. Using a strongly typed ChildProcessId
instead will allow the compiler to catch errors.

This change creates a ChildProcessId type and modifies
ChildProcessHost::GenerateChildProcessUniqueId to use this new type.
During the investigation, it was determined
GenerateChildProcessUniqueId should only be called on the UI thread,
so a check to ensure it's only called on the UI thread was added.

Follow-ups will be required to modify references.

Bug: 379869738
Change-Id: I3e3998a864a398c7323852969c01cc6186d89670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6034112
Auto-Submit: Emily Andrews <emiled@microsoft.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Stefan Smolen <ssmole@microsoft.com>
Reviewed-by: Mike Wasserman <msw@chromium.org>
Commit-Queue: Mike Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1391188}
2024-12-03 20:15:48 +00:00
Etienne Pierre-doray
e531336ad9 [battery] Enable heavy AlignWakeUps under battery saver mode
- Add a feature kBatterySaverModeAlignWakeUps
- Add a signal to all child processes
- Call OverrideAlignWakeUpsState in browser,
  renderers and child processes

Bug: 40158967
Change-Id: I6588dfa20182fb5d410bf2b839588066f6f270a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5347739
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1329769}
2024-07-18 20:07:24 +00:00
Marijn Kruisselbrink
67f4101883 Add histogram support in app shims using shared memory.
Following the same pattern other child processes uses, this CL
adds support for histograms to app shim process using shared
memory. Histograms collected before the shared memory connection
is set up are transmitted using the ChildHistogramFetcher mojo
interface (and are lost if a connection is never established).
Histograms after are shared immediately via shared memory (but
are lost if the browser process crashes before they are processed,
matching behavior for other child processes).

See https://docs.google.com/document/d/19dANu83w-9q-Ft5PU1cxDHiKdZv4hDLyAdr2Zf3JgSc/edit?usp=sharing for more background.

Bug: 40281917
Include-Ci-Only-Tests: true
Change-Id: I0f00edba892bae3549293d46ab9af602dbf5176e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5363833
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1288435}
2024-04-17 00:35:53 +00:00
Lei Zhang
6ed42ea04a Remove various RunServiceDeprecated() methods in //content
LaunchUtilityProcessServiceDeprecated() is gone, so all the
RunServiceDeprecated() methods are now dead code. Remove them. Then
transitively remove CastContentUtilityClient.

Bug: 240192080
Change-Id: If697b7b9ee6d90c4bf4831b014e00981dfabefd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5405776
Reviewed-by: Chris Bookholt <bookholt@chromium.org>
Reviewed-by: Vigen Issahhanjan <vigeni@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280450}
2024-03-30 00:54:21 +00:00
Miyoung Shin
3dfa9edc60 Fix the use of incorrect namespaces in //content
This CL fixes the use of incorrect namespaces detected by
`bugprone-forward-declaration-namespace` clang-tidy check in //content.

Bug: 1519029
Change-Id: I4cfe6c9a1c44eb8d9d4fa7da4e700dc0fa2a12dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5210693
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1250628}
2024-01-23 03:09:50 +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
Dave Tapuska
0189cf30e3 Remove AddFilter when legacy IPC is disabled in content
- Conditionally include browser_message_filter.h/cc in the build
- Remove unused imports of browser_message_filter.h
- Remove unused chrome::bad_message::ReceivedBadMessage
- Remove unused BrowserAssociatedInterface

Bug: 993189
Change-Id: Icf114631fbc495b660aafe1a148e716cc7a19f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5177633
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1244658}
2024-01-09 15:06:14 +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