This rewrites the following containers:
std::list, std::unordered_set, base::flat_set, std::stack, std::queue.
This patch was generated by running
./tools/clang/rewrite_templated_container_fields/rewrite-multiple-platforms.sh
Binary size increase:
The increase is only (~9.5kB) above the per-patch limit (+16kB). This
is not a lot given the size of the rewrite. Increase of around 500kb was
approved for MiraclePtr.
AX-Relnotes: n/a.
Binary-Size: See commit description.
Bug: 325302189
Change-Id: I969ae345ef6d6117d5c1773773be913197ca2e73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306923
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Ali Hijazi <ahijazi@chromium.org>
Owners-Override: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1265100}
This CL, behind a flag, updates the create/share flow for the histogram shared memory region between the browser process and its child processes. This allows the child processes to immediately allocate metrics from the shared memory region instead of waiting until the first browser/child IPC.
For the renderer, the shared memory region and allocator are created before the child is launched. This was already the case for the other child processes.
In the browser, the child process hosts expose the shared memory region to the ChildProcessLauncher/Helper so that the handle to the shared memory region passed to the child process on launch.
In the child, the metrics service initializes its histogram allocator to use the shared memory, on seeing the --histogram-shared-memory-region parameter.
See:
* go/improve-chrome-subprocess-metrics
Bug: 1028263, 1290457
Change-Id: I3dc7d59c42b6588dbf8ea31ca05254470d0a8b30
Low-Coverage-Reason: COVERAGE_UNDERREPORTED (crbug.com/1512202)
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568968
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Mark Seaborn <mseaborn@chromium.org>
Commit-Queue: Roger McFarlane <rogerm@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251503}
This is a readability improvement that also makes it more in line with
the usage of ChildProcessLauncher in render_process_host_impl.cc.
Bug: 1466479
Change-Id: I4fd20d994be0206becb7b2cac104010170292441
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4706725
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1173814}
This is a reland of commit 246a72ce07
The major change is to the test. There used to be an interactive UI
test but it was flaky. To try to make the test more deterministic,
the OS notifications are simulated in a regular browsertest instead.
Original change's description:
> [MacOS] New feature to adjust the backgrounded state of the GPU process
>
> The new feature (named "AdjustGpuProcessPriority") ensures the
> backgrounded state of the GPU process mirrors the backgrounded state
> of the browser process.
>
> Bug: 1400472
> Change-Id: I284c21ef27536abe3548aa1338e1464e25ddde89
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4085787
> Commit-Queue: Patrick Monette <pmonette@chromium.org>
> Reviewed-by: Bo Liu <boliu@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1100196}
Bug: 1400472
Change-Id: I1b2d2fafbd880c5abc3f97b74c9d7fdd0d3a7c42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219232
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1115500}
This is a reland of commit e97ada6c24
The revert did not fix the issue so I'm relanding it as-is. The
failing test was disabled in another CL.
Original change's description:
> Add BrowserChildProcessExitedNormally
>
> This new method allows an observer to get the ChildTerminationInfo data
> from a child process that terminates normally.
>
> Bug: 1313215
> Change-Id: Iafd41d9b54e3a47014d350aac0a7658d72ffa9b4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3792828
> Commit-Queue: Patrick Monette <pmonette@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1050887}
Bug: 1313215
Change-Id: Idc623d03b1dde7fbc3f99913f5cecef99806c26e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3918751
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1052399}
This new method allows an observer to get the ChildTerminationInfo data
from a child process that terminates normally.
Bug: 1313215
Change-Id: Iafd41d9b54e3a47014d350aac0a7658d72ffa9b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3792828
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1050887}
With this change, BrowserChildProcessHostDisconnected is no longer
called if BrowserChildProcessLaunchedAndConnected is never sent.
The only exception is in single process mode, where a launched and
connected notification doesn't make sense, yet
InProcessUtilityThreadHelper still depends on the disconnect
notification.
Another change is that IsProcessLaunched() now correctly handles the
case where SetProcess() is used instead of the launch helpers.
Bug: 1342943
Change-Id: Ib11fedf3d36e9781faef1723f8d3b5daea78f5ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3791225
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Patrick Monette <pmonette@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1029561}
This CL passes BrowserInitParams to Utility process as Memory FD.
FD map is contained in BrowserChildProcessHost::DataToPassAsFD with
files_to_preload.
This CL also changes files_to_preload field to limit only on posix
platforms.
Note that files_to_preload value was only used from posix even without
this CL, so it won't affect the behavior.
This change aims to let utility process be able to obtain ash dir from BrowserInitParams. This feature will be implemented in the later CL.
This is a part of resource file sharing work and doesn't affect the
behavior for now.
Bug: 1253280
Change-Id: Ibd92217974e2e763c58ab71af85ee50a13d2c03e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3599393
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Eriko Kurimoto <elkurin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1001877}
This refactors FieldTrial to simplify its public API and unify it
across all platforms so every public method has the same signature on
every platform.
This simplifies the call sites in the content layer by removing
per-platform specific call sites in favor of unified calls and moving
some of the logic done in //content to //base. In particular, command
line switches used only by FieldTrial have been moved to //base, from
//content. They are also no longer passed as parameters to the public
API of FieldTrial.
In addition, this adds supports for shared-memory distribution of
FieldTrial configuration to child processes on Fuchsia. This is
achieved by duplicating the handle for the VMO backing the FieldTrial
configuration in the parent process and passing it to the child
process startup handles.
This also changes the Windows child process launcher logic to make use
of the provided LaunchOptions argument, rather than initializing a new
object.
Finally, this cleans up header usage in //base/metrics/field_trial.h
and fixes missing includes in various parts of the code base.
Bug: 752368, 1262370
Change-Id: I9b0836b467790f1da96d85fe16a6e2c6d334f709
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3230582
Commit-Queue: Fabrice de Gans <fdegans@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#938902}
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}
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}
VizMain is bound in the GPU process as an interface associated with the
main legacy IPC Channel. That Channel is no longer used for any other
purpose though, so the association serves no purpose. The only legacy
IPC Channels in use by the GPU process are created later, as an
implementation detail of Viz (via EstablishGpuChannel IPCs).
This changes the VizMain interface to use a regular interface pipe
instead of an associated interface.
Bug: None
Change-Id: Id6b3b6352f7d2327ab5c9808893155f2d5ce445a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2806255
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Ken Buchanan <kenrb@chromium.org>
Auto-Submit: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#869760}
This relands commit 305cf78bae with fixing
the flakiness of BackgroundTracingManagerBrowserTest.* in
content_browsertests. Fix by opening the socket to the system tracing
service on the right task runner.
Original change's description:
> The security sandbox forbids making socket connections directly from
> within most child processes (except the network utility process). Trace
> data for renderers are missing from a tracing session with Chrome data
> sources on non-Android Posix platforms.
>
> This change introduces a new Mojo interface, SystemTracingService, that
> is shared between the browser and child processes for making a socket
> connection to the system tracing service daemon. A child process
> receives a Mojo remote interface and then invokes the OpenProducerSocket
> method to open the socket connection in the browser process. The browser
> process then passes the socket connection to the child in the response.
> The child process then adopts the connected socket in initializing the
> connection in PosixSystemProducer.
>
> Full design doc: go/crosetto-chrome-producer-dd
>
> Bug: b/147789115
> Test: services_unittests: SystemTracingServiceTest.*,
> SystemPerfettoTest.SandboxedOpenProducerSocket
> Change-Id: Id698dc656b7b9ede723e3a887532c33544914edc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435129
> Commit-Queue: Chinglin Yu <chinglinyu@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: Stephen Nusko <nuskos@chromium.org>
> Reviewed-by: Eric Seckler <eseckler@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#844743}
Bug: 1169185
Test:content_browsertests --test-launcher-bot-mode \
--gtest_filter="BackgroundTracingManagerBrowserTest.*" \
--gtest_repeat=100
Change-Id: I02b4bc206013b9dbc91766b3d643d07d695ff87b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643425
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Chinglin Yu <chinglinyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#847517}
This reverts commit 305cf78bae.
Reason for revert: Crashing many browser tests, in particular BackgroundTracingManagerBrowserTest.*
Original change's description:
> tracing: make PosixSystemProducer work in child processes on Posix.
>
> The security sandbox forbids making socket connections directly from
> within most child processes (except the network utility process). Trace
> data for renderers are missing from a tracing session with Chrome data
> sources on non-Android Posix platforms.
>
> This change introduces a new Mojo interface, SystemTracingService, that
> is shared between the browser and child processes for making a socket
> connection to the system tracing service daemon. A child process
> receives a Mojo remote interface and then invokes the OpenProducerSocket
> method to open the socket connection in the browser process. The browser
> process then passes the socket connection to the child in the response.
> The child process then adopts the connected socket in initializing the
> connection in PosixSystemProducer.
>
> Full design doc: go/crosetto-chrome-producer-dd
>
> SystemPerfettoTest.SandboxedOpenProducerSocket
>
> Bug: b/147789115
> Test: services_unittests: SystemTracingServiceTest.*,
> Change-Id: Id698dc656b7b9ede723e3a887532c33544914edc
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435129
> Commit-Queue: Chinglin Yu <chinglinyu@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Reviewed-by: Stephen Nusko <nuskos@chromium.org>
> Reviewed-by: Eric Seckler <eseckler@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#844743}
TBR=kinuko@chromium.org,primiano@chromium.org,skyostil@chromium.org,eseckler@chromium.org,chinglinyu@chromium.org,nuskos@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/147789115, 1169185
Change-Id: Ibe932297b317fdee6cbd9ef5b09ad1aeffd2f1ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643258
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Tommy Nyquist <nyquist@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845763}
The security sandbox forbids making socket connections directly from
within most child processes (except the network utility process). Trace
data for renderers are missing from a tracing session with Chrome data
sources on non-Android Posix platforms.
This change introduces a new Mojo interface, SystemTracingService, that
is shared between the browser and child processes for making a socket
connection to the system tracing service daemon. A child process
receives a Mojo remote interface and then invokes the OpenProducerSocket
method to open the socket connection in the browser process. The browser
process then passes the socket connection to the child in the response.
The child process then adopts the connected socket in initializing the
connection in PosixSystemProducer.
Full design doc: go/crosetto-chrome-producer-dd
SystemPerfettoTest.SandboxedOpenProducerSocket
Bug: b/147789115
Test: services_unittests: SystemTracingServiceTest.*,
Change-Id: Id698dc656b7b9ede723e3a887532c33544914edc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435129
Commit-Queue: Chinglin Yu <chinglinyu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844743}
Android has a browser-side timeout for establish channel which is
usually the #1 crash on the stable channel. This CL will try to perform
a DumpWithoutCrashing in the gpu process when this timeout happens to
gather more data.
Bug: 680777
Change-Id: I21e1701c359afc57e31a50403d59ba9a94a2baae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222919
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773783}
This CL makes sure that reports of bad mojo messages are preserving the
callstack and the crash keys. This is done by making sure that
DumpWithoutCrashing is called synchronously from
BrowserChildProcessHostImpl::OnMojoError.
The CL also opportunitically reduces code duplication related to
actually terminating a child process. The duplicated code is extracted
into a new TerminateProcessForBadMessage private method and reused both
from OnMojoError and from TerminateOnBadMessageReceived.
Bug: 1062418
Change-Id: I8f5bf802e9aabec4d92ee9fd37c1c55012f1250f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106806
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751478}
This reverts commit bfca6c8096.
Reason for revert: Reverting the revert which was only done make reverting an earlier CL possible. Earlier CL has been fixed and relanded.
Original change's description:
> Revert "Move Utility processes off Service Manager"
>
> This reverts commit 0a311ff4af.
>
> Reason for revert: breaks graphics on some Chrome OS devices.
>
> Original change's description:
> > Move Utility processes off Service Manager
> >
> > This migrates Utility processes to direct ChildProcess API usage instead
> > of bootstrapping IPC through the Service Manager.
> >
> > As this is the last remaining use of Service Manager IPC to bootstrap
> > Content child processes, this also rips out a bunch of infrastructure
> > that existed only to support that.
> >
> > Bug: 977637
> > Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
> > Commit-Queue: Ken Rockot <rockot@google.com>
> > Reviewed-by: Robert Sesek <rsesek@chromium.org>
> > Reviewed-by: Avi Drissman <avi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#718352}
>
> NOPRESUBMIT=true
>
> Bug: 1028852
> Bug: 977637
> Tbr: rockot@google.com
> Tbr: avi@chromium.org
> Tbr: rsesek@chromium.org
> Change-Id: I9b2e8ca44f5b6accc2d3718cab3cb547d979c230
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948402
> Commit-Queue: Shuhei Takahashi <nya@chromium.org>
> Reviewed-by: Shuhei Takahashi <nya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#720938}
TBR=avi@chromium.org,rockot@google.com,nya@chromium.org,rsesek@chromium.org
NOPRESUBMIT=true
Change-Id: I79ea423c97880366125abfb659dae223d0185023
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1028852, 977637
Tbr: rsesek@chromium.org
Tbr: avi@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949304
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721383}
This reverts commit 881a65d746.
Reason for revert: breaks graphics on some Chrome OS devices.
Original change's description:
> Move Renderer processes off Service Manager
>
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
>
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process
> launching.
>
> After this CL, only utility processes remain to be moved off of
> Service
> Manager IPC.
>
> NOPRESUBMIT=true
>
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}
NOPRESUBMIT=true
Bug: 1028852
Bug: 977637
Tbr: rockot@google.com
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Tbr: mbarbella@chromium.org
Tbr: rsesek@chromium.org
Tbr: avi@chromium.org
Change-Id: I30a52d825cc156b066d7c2ec455c8fb588a408af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948663
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720939}
This reverts commit 0a311ff4af.
Reason for revert: breaks graphics on some Chrome OS devices.
Original change's description:
> Move Utility processes off Service Manager
>
> This migrates Utility processes to direct ChildProcess API usage instead
> of bootstrapping IPC through the Service Manager.
>
> As this is the last remaining use of Service Manager IPC to bootstrap
> Content child processes, this also rips out a bunch of infrastructure
> that existed only to support that.
>
> Bug: 977637
> Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
> Commit-Queue: Ken Rockot <rockot@google.com>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#718352}
NOPRESUBMIT=true
Bug: 1028852
Bug: 977637
Tbr: rockot@google.com
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Change-Id: I9b2e8ca44f5b6accc2d3718cab3cb547d979c230
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948402
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720938}
This migrates Utility processes to direct ChildProcess API usage instead
of bootstrapping IPC through the Service Manager.
As this is the last remaining use of Service Manager IPC to bootstrap
Content child processes, this also rips out a bunch of infrastructure
that existed only to support that.
Bug: 977637
Change-Id: I08e542f1d9f294bc1c387ea5845e8ba0d5a7d2b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919719
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718352}
This is a reland of 45cef59a78
Original change's description:
> Move Renderer processes off Service Manager
>
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
>
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process launching.
>
> After this CL, only utility processes remain to be moved off of Service
> Manager IPC.
>
> NOPRESUBMIT=true
>
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}
NOPRESUBMIT=true
Bug: 977637
Change-Id: I9dd89104626ef73f81abd93c8a35310a2d6997a2
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Tbr: mbarbella@chromium.org
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930104
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#718334}
This reverts commit 45cef59a78.
Reason for revert: breaks a fuzzing tool compile
Original change's description:
> Move Renderer processes off Service Manager
>
> Migrates Renderer processes to use the simpler ChildProcess IPC
> interface in place of deprecated Service Manager IPC.
>
> Support for preloaded files in service manifest definitions is
> effectively removed in favor of explicit parameters on
> BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
> snapshot files) has been migrated from manifest data to a simple map
> definition, and it's used during renderer and utility process launching.
>
> After this CL, only utility processes remain to be moved off of Service
> Manager IPC.
>
> NOPRESUBMIT=true
>
> Bug: 977637
> Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
> Tbr: boliu@chromium.org
> Tbr: yucliu@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
> Reviewed-by: Martin Barbella <mbarbella@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717920}
TBR=avi@chromium.org,rockot@google.com,mbarbella@chromium.org,rsesek@chromium.org
Change-Id: I3fa67ad894cd5725ff71d59cadec2cebc4917952
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 977637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930102
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717937}
Migrates Renderer processes to use the simpler ChildProcess IPC
interface in place of deprecated Service Manager IPC.
Support for preloaded files in service manifest definitions is
effectively removed in favor of explicit parameters on
BrowserChildProcessHost and ChildProcessLauncher. The only use case (V8
snapshot files) has been migrated from manifest data to a simple map
definition, and it's used during renderer and utility process launching.
After this CL, only utility processes remain to be moved off of Service
Manager IPC.
NOPRESUBMIT=true
Bug: 977637
Change-Id: I1d8205cb73ead904aa21b85d6cbee11cb3fc84f5
Tbr: boliu@chromium.org
Tbr: yucliu@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918375
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717920}
This removes Service Manager API dependencies from the Tracing service
and its clients.
A new TracingService mojom interface is introduced to own and control a
singleton Tracing service instance. This interface allows for client
registration and ConsumerHost binding.
The browser maintains a registry of active child processes, updated
explicitly by RenderProcessHostImpl and BrowserChildProcessHostImpl.
The registry is used to keep the Tracing service connected to all child
processes while it's running.
Bug: 977637
Change-Id: I7c67399fd03b78f68c997a26d89561fc71512cd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918311
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717489}
This reverts NaCl processes to use only the Legacy IPC Channel (over
Mojo) for all IPC, rather than bootstrapping them as Service Manager
service processes just so they can then bind an IPC Channel.
To support this, Browser/ChildProcessHost is modified to support such
processes if so configured at construction time. This "legacy mode" for
ChildProcessHost can be removed if/when NaCl processes are removed from
Chrome.
Some light groundwork is put down for further refactoring as well:
namely the Mojo invitation ownership is lifted into ChildProcessHost,
and a ChildProcessHost::IpcMode enum is introduced to select what mode
different process types will operate in. Follow-up CLs will introduce
a new IPC mode and incrementally port all other process types to it.
IpcMode::kServiceManager will be removed in the near future, and
IpcMode itself will be removed completely (bringing ChildProcessHost
back down to only one mode of operation) once kLegacy can be removed
too.
Bug: 977637
Change-Id: I1abec0fe8ad7b2a18bddcdd467657447c641370e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1915320
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#716345}
This service is run in the GPU process and its interfaces are bound only
by the browser, brokering unfiltered requests from renderers. Logic is
simplified by removing all dependencies on Service Manager APIs, in
favor of the browser's brokering logic talking directly to
GpuProcessHost and maintaining a persistent connection to the service.
Bug: 977637
Change-Id: I9047889de659b8ff61df4bae40867d3b81d8127f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761689
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688616}
This removes all Service Manager dependencies from the Font Service in
favor of direct Mojo interface connection. The browser maintains an
internal API for connecting new pipes to the in-process service
instance.
This requires ChildProcessHostImpl to support the BindHostReceiver()
mojom API for non-renderer child processes, as well as
plumbing it up to UtilityProcessHost and PluginProcessHost. Rather than
generic support through Service Manager with manifest-based filtering,
each process host type explicitly implements its support for binding the
FontService interface when requested by the child process.
This CL also fixes some thread-safety bugs in the existing Font Service
client library code which could cause the client endpoint and/or the
WeakPtrFactory to be destroyed on the wrong sequence. FontServiceThread
has been refactored to make the WeakPtrFactory unnecessary, and the
client endpoint is now always destroyed on the correct sequence.
Finally, this changes font_service_unittests to use an in-process
background service instance rather than using the Service Manager to
spin up a dedicated service executable.
Bug: 977637
Change-Id: I3efdafb06ae2d79e9cb149675e49c29e30d0cad6
Test: for good measure, manually tested PDF rendering
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1756435
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687694}