0
Commit Graph

302 Commits

Author SHA1 Message Date
Will Harris
d749df4b69 Simplify threading in BrowserChildProcessHost notifications.
These objects now operate on the UI thread so there is no
need to post the notification tasks.

BUG=904556

Change-Id: I95691cab7c318ac055ded76f0d612b9c2724ffd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3346105
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#953736}
2021-12-23 02:56:58 +00:00
Will Harris
df8fcb48c2 Reland "Add launch failure notifications to BrowserChildProcessObserver"
This is a reland of 893230151e

The previous version of this CL mistakenly removed a default
case statement for an 'int' field, so an expected compile error
was not generated but instead an early return was skipped.

Original change's description:
> Add launch failure notifications to BrowserChildProcessObserver
>
> Also, fix a bug where the Windows sandbox would return SBOX_ALL_OK
> even if base::LaunchProcess failed, and launch_result was not
> being set for elevated processes.
>
> Add reporting of GetLastError on Windows in the
> ChildProcessTerminationInfo for failed launches.
>
> Also, clean up some switch statements to remove default cases.
>
> BUG=1280005
>
> Change-Id: I1001fc950b8456b78ef1a9a985ca07cf288e8a04
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3340072
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Will Harris <wfh@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#952182}

Bug: 1280005, 1280541
Change-Id: I81f3354e9870a455644e77144a40c4acbdf14ebe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3345720
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#952667}
2021-12-18 09:21:31 +00:00
Kush Sinha
d26f685ff4 [Sheriff] Revert "Add launch failure notifications to BrowserChildProcessObserver"
This reverts commit 893230151e.

Reason for revert: "browser_tests" failing on builder "Linux ChromiumOS MSan Tests"

Original change's description:
> Add launch failure notifications to BrowserChildProcessObserver
>
> Also, fix a bug where the Windows sandbox would return SBOX_ALL_OK
> even if base::LaunchProcess failed, and launch_result was not
> being set for elevated processes.
>
> Add reporting of GetLastError on Windows in the
> ChildProcessTerminationInfo for failed launches.
>
> Also, clean up some switch statements to remove default cases.
>
> BUG=1280005
>
> Change-Id: I1001fc950b8456b78ef1a9a985ca07cf288e8a04
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3340072
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Will Harris <wfh@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#952182}

Bug: 1280005, 1280541
Change-Id: I368d0c89ca6911cb4145bcec13edf2ad8bd4d829
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3344787
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Kush Sinha <sinhak@chromium.org>
Reviewed-by: Aya Elsayed <ayaelattar@chromium.org>
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Owners-Override: Kush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/main@{#952303}
2021-12-16 11:00:34 +00:00
Will Harris
893230151e Add launch failure notifications to BrowserChildProcessObserver
Also, fix a bug where the Windows sandbox would return SBOX_ALL_OK
even if base::LaunchProcess failed, and launch_result was not
being set for elevated processes.

Add reporting of GetLastError on Windows in the
ChildProcessTerminationInfo for failed launches.

Also, clean up some switch statements to remove default cases.

BUG=1280005

Change-Id: I1001fc950b8456b78ef1a9a985ca07cf288e8a04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3340072
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#952182}
2021-12-16 01:17:22 +00:00
David Sanders
de533fceff IWYU improvements for usage of base/no_destructor.h
Removes unused #include lines for base/no_destructor.h and adds them
to files which use base::NoDestructor but did not have the #include.

Net result is a slight decrease in overall build size from trimming the
unused #include lines.

AX-Relnotes: n/a.
Bug: 242216
Change-Id: I73f58233657b37b00bdc1e8322e078919519a379
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3340088
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Austin Tankiang <austinct@chromium.org>
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#951939}
2021-12-15 14:59:43 +00:00
Will Harris
6f5f50aba3 Only set profiling file for non-elevated browser child processes.
This CL moves the code that sets the profiling file from ChildProcess
into BrowserChildProcess.

It then no longer attempts to set the profiling file for elevated
browser child processes since it is not possible to pass a handle
to such a process as it is not permitted to duplicate a handle into
a process that cannot be opened, such as one running at a higher
integrity level.

This CL also has the consequence that the profiling file is no
longer passed to non-browser child processes which is just
chrome's ServiceUtilityProcessHost. Since this process is also
often running elevated (e.g. cloud print service) it is likely
this operation was never working correctly anyway.

BUG=1276198

Change-Id: I9684363ee4630583e90e31a4005cd1f26e60e050
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3313495
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#948049}
2021-12-03 17:39:45 +00:00
Erik Chen
ad49c33262 lacros: Enable tracking of TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM
The enum is defined but only handled in some files for Lacros. This
appears to have been an oversight. This CL fixes all callsites to have
the same behavior for ash and lacros.

Bug: 1235874
Change-Id: Ibe3f3b9c19ac292e162230bc1ddb628082996028
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3269048
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946647}
2021-11-30 20:56:57 +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
Fabrice de Gans
24f4a80bee [field-trial] Refactor FieldTrial and add Fuchsia support
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}
2021-11-05 19:57:14 +00:00
John Abd-El-Malek
9c256eb60e Some simplifications in content now that ProcessHostOnUI is on by default.
Bug: 904556
Change-Id: I421e5a343fa8f0888c5a5af5c736b2d884944fa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3174369
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923977}
2021-09-22 19:17:13 +00:00
Erik Chen
d9cc471e12 Prevents non-browser processes from requesting memory dumps.
This CL makes several changes:

(1) Causes the browser to reset non-browser
mojo::PendingReceiver<Coordinator>. This means that non-browser
processes will never be able to use the Coordinator interface.

(2) Add CHECKs to existing code to prevent non-browser processes from
attempting to use the Coordinator interface.

A code audit shows that all Coordinator usages should already only be
from the browser process.

Note that (2) is important since attempting to use an unbound interface
will trigger a nullptr dereference, which is undefined behavior.

Bug: 1251787
Change-Id: Ifbe9610cc0e373edaaa60fad46b447e8bdb3ec04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3174305
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923693}
2021-09-22 02:05:50 +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
Lei Zhang
ae2ff1ebed Swap from base/stl_util.h to cxx17_backports.h in content/ .cc files.
base::size() has been moved to base/cxx17_backports.h, so .cc files that
use base::size(), but no other function from base/stl_util.h, can
directly include base/cxx17_backports.h and not base/stl_util.h.

Bug: 1210983
Change-Id: I42a598a9c2b8fcbfd1e225329109ae3308bd9518
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2915348
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886358}
2021-05-25 17:29:39 +00:00
Anton Bikineev
f62d1bf48e content: Replace base::Optional and friends with absl counterparts
This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
  ->
  include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional

Bug: 1202909
Change-Id: Ie9f37bcbf6115632a19f4d063387d07b3723926f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897246
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883270}
2021-05-15 17:56:07 +00:00
Lei Zhang
b49a213e32 Remove unneeded base/strings/stringprintf.h includes.
List of files to delete from generated using the following command:

git grep -l base/strings/stringprintf.h | \
    xargs grep -L 'StringPrint[fV]' | xargs grep -L StringAppend | \
    grep -E '(cc|mm|h)$'

Change-Id: Ibc72245f08730b4d25283e2d966235b61513c7ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2849392
Reviewed-by: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#876365}
2021-04-26 23:48:55 +00:00
John Abd-El-Malek
a1c30bc2ab Fix various browser_tests and content_browsertests to work when ProcessHost objects live on UI thread.
Bug: 904556
Change-Id: Id9dd20c6bc3d787119408be874411a254dc5d8e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2828695
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#873077}
2021-04-15 22:31:19 +00:00
John Abd-El-Malek
1b4dbdacb9 Move ProcessHosts for non renderer processes to the main thread.
They were on the IO thread to avoid deadlocks with NPAPI plugins, but we don't have that anymore.

Currently this is off by default behind a feature flag. I have tried to minimize the churn in the code to enable this. Some places where it would involve too much duplication or refactoring I've kept with PostTasks from UI to UI thread. Once this is enabled by default then I'll simplify all the callsites.

Bug: 904556
Change-Id: Ib664d644e0af016d5736348218bcc38cb79341f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2806425
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870614}
2021-04-08 18:15:42 +00:00
Peter Boström
dd7e40ec31 Apply modernize-make-unique to content/
This is a large-scale change: go/chromium-modernize-make-unique

Bug: 1194272
Change-Id: Id035e6a5058ab109a4333f1b8f8225da1c6989e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803034
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/master@{#869261}
2021-04-05 20:40:10 +00:00
Quang Minh Tuan Nguyen
36d4dca42d [UMA] Move add histogram* files to metrics folder
So changes in those files do not need code review from /content OWNERS.

Bug: 1156153
Change-Id: Ic5f2a6a3ca61c2bcd6ea5fc306dc21a901c81027
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2786551
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Quang Minh Tuan Nguyen <nqmtuan@google.com>
Cr-Commit-Position: refs/heads/master@{#867430}
2021-03-30 02:41:22 +00:00
Jan Wilken Dörrie
aace0cfef2 [LSC] Replace base::string16 with std::u16string in //{chrome*,content}
This change replaces base::string16 with std::u16string in //chrome,
//chromecast, //chromeos and //content.

Reproduction steps:
$ git grep -lw 'base::string16' chrome* content | \
      xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format

Bug: 1184339
Change-Id: I8fae0ab25b5d9bf1cb416ae5f47d7f680fb8f3ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752229
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862152}
2021-03-11 22:01:58 +00:00
Chinglin Yu
f4b1c65d37 Reland: "tracing: make PosixSystemProducer work in child processes on Posix."
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}
2021-01-27 06:59:13 +00:00
Tommy Nyquist
c9f08fd70a Revert "tracing: make PosixSystemProducer work in child processes on Posix."
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}
2021-01-21 19:35:48 +00:00
Chinglin Yu
305cf78bae 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}
2021-01-19 12:52:06 +00:00
Francois Doray
cbef989adf Remove ResourceCoordinatorService.
This class added an unnecessary layer of complexity to access
memory instrumentation functionality.

Follow-up: Rename //services/resource_coordinator/ to
//services/memory_instrumentation and remove "memory_instrumentation"
subdirectories.

Change-Id: I556423d2004ab0d2b2462ae5b0cac529712d50de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593829
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Auto-Submit: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840316}
2021-01-05 21:39:21 +00:00
Yuta Hijikata
d0a8b6b606 LaCrOS: Replace defined(OS_CHROMEOS) with BUILDFLAG(IS_CHROMEOS_ASH)
The change is mostly mechanical replacing defined(OS_CHROMEOS) with
BUILDFLAG(IS_CHROMEOS_ASH) and GN variable is_chromeos with
is_chromeos_ash with some special cases (For those cases please
refer to http://go/lacros-macros).

The patch is made in preparation to switching lacros build from
target_os=linux to target_os=chromeos. This will prevent lacros from
changing behaviour after the switch.

Bug: 1052397
Change-Id: Ieb265e116ff6ada5e2f99d609ff12fb9f92727e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534271
Commit-Queue: Yuta Hijikata <ythjkt@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829687}
2020-11-20 16:36:15 +00:00
Ken Rockot
cd277658fb Remove stale references to system_connector.h
This header is going to be removed. Most inclusions are unused. This
CL prunes them and removes an effectively unused testing API.

Bug: 977637
Change-Id: I032c1a538751ac6b610aeee8867429563bb8f187
Tbr: alexmos@chromium.org
Tbr: hidehiko@chromium.org
Tbr: spang@chromium.org
Tbr: thakis@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544936
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#828440}
2020-11-17 22:40:03 +00:00
Ken Rockot
4e805fd354 Reland "Delete service_manager/embedder/switches.h"
This is a reland of 18096716fa

No interesting changes, just updated to resolve a
compile-breaking collision with another CL that landed
earlier today. (see PS3)

Original change's description:
> Delete service_manager/embedder/switches.h
>
> Each switch is either deleted because it's no longer used, or migrated
> to a more appropriate layer (generally Content).
>
> Bug: 977637
> Change-Id: I9c4a74d4d99f4f7e7df8319d95b4ac4f55f11165
> Tbr: caseq@chromium.org
> Tbr: dschuff@chromium.org
> Tbr: finnur@chromium.org
> Tbr: halliwell@chromium.org
> Tbr: wez@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440908
> Commit-Queue: Ken Rockot <rockot@google.com>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#812318}

Bug: 977637
Change-Id: Ia33b2999f531e7504456b4b71d3b5e571af3a354
Tbr: caseq@chromium.org
Tbr: dschuff@chromium.org
Tbr: finnur@chromium.org
Tbr: halliwell@chromium.org
Tbr: rsesek@chromium.org
Tbr: wez@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440974
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812531}
2020-10-01 03:07:39 +00:00
Ken Rockot
37c88eb95e Revert "Delete service_manager/embedder/switches.h"
This reverts commit 18096716fa.

Reason for revert: collides with https://chromium-review.googlesource.com/c/chromium/src/+/2401506 for compile failure 

Original change's description:
> Delete service_manager/embedder/switches.h
>
> Each switch is either deleted because it's no longer used, or migrated
> to a more appropriate layer (generally Content).
>
> Bug: 977637
> Change-Id: I9c4a74d4d99f4f7e7df8319d95b4ac4f55f11165
> Tbr: caseq@chromium.org
> Tbr: dschuff@chromium.org
> Tbr: finnur@chromium.org
> Tbr: halliwell@chromium.org
> Tbr: wez@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440908
> Commit-Queue: Ken Rockot <rockot@google.com>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#812318}

TBR=avi@chromium.org,rockot@google.com,rsesek@chromium.org

Change-Id: I6edf5e5305491092e3d9ad52d252a7eafc518a0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 977637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440973
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#812330}
2020-09-30 21:00:59 +00:00
Ken Rockot
18096716fa Delete service_manager/embedder/switches.h
Each switch is either deleted because it's no longer used, or migrated
to a more appropriate layer (generally Content).

Bug: 977637
Change-Id: I9c4a74d4d99f4f7e7df8319d95b4ac4f55f11165
Tbr: caseq@chromium.org
Tbr: dschuff@chromium.org
Tbr: finnur@chromium.org
Tbr: halliwell@chromium.org
Tbr: wez@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440908
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812318}
2020-09-30 20:49:29 +00:00
Adam Rice
e77e5b7d48 Remove unneeded WebSocket flags
Remove command-line flags --websocket-read-buffer-size and
--websocket-renderer-receive-quota-max which are no longer needed as the
performance investigation has finished.

Also replace the kReceiveQuotaThreshold constant in websocket_channel.cc
with a kReceiveDataPipeCapacity constant in websocket.cc, which better
reflects its current usage.

Change the types of kReadBufferSize and kReceiveDataPipeCapacity to
reflect the types at the points where they are used.

Also mark WebSocketBasicStream as final, as its destructor calls the
Close() virtual method and it would not behave correctly in a subclass.

Also change some constants from "const" to "constexpr".

BUG=865001

Change-Id: I761bd08de534ef27a77a9523c86ea6f1a61b9266
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2383396
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803308}
2020-08-31 23:31:09 +00:00
Avi Drissman
7c57be77a7 Migrate to OS_MAC and OS_APPLE in content
Because content is not used by iOS, this migrates
 defined(OS_MACOSX) -> defined(OS_MAC)

Bug: 1105907
Change-Id: Ibf85273fea9c5566594ca00f2589b890515be6c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321210
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792842}
2020-07-29 20:09:46 +00:00
Jun Mukai
873d7d19cd Do not register NaCl processes to tracing service.
It turns out that the registration code path runs on NaCl
modules too, however it doesn't work well with tracing
component (in fact, no tracing data are collected for NaCl
modules). Since NaCl is not working yet registering,
services/tracing/perfetto/consumer_host.cc waits for
the activation of NaCl processes but it always have to wait
until the timeout (10 seconds).

Although NaCl ended already, ChromeOS is an exception. It still
has a few NaCl processes by default in the production, and so
this 10-second delay happens always.

Bug: 1101468
Test: with Tast test
Change-Id: I55f8664e0b6089c6eb59fcde87c6dfd099530f8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278349
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: ssid <ssid@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785463}
2020-07-06 18:12:34 +00:00
Ken Rockot
2fc09267f9 Reland "Support dynamic Mojo Core on Linux"
This is a reland of 002e044483

No changes other than disabling the test under MSan where
it is broken and probably not worth fixing.

Original change's description:
> Support dynamic Mojo Core on Linux
>
> This introduces a new --mojo-core-library-path Content switch which
> instructs Content to initialize each process with an implementation
> of Mojo Core found in the referenced shared library rather than using
> the version linked into the main binary.
>
> This allows for IPC interoperability between a Content embedder and
> another application which provides its own copy of Mojo Core.
>
> Fixed: 1082473
> Change-Id: I1e50c505e91a53e60056a4b8c691d91728f7a5ea
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229664
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#778002}

Tbr: avi@chromium.org
Change-Id: I6a2270c87c294455907fb369640b3be0819b2431
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247166
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#780151}
2020-06-19 03:21:30 +00:00
Nancy Wang
62ff80c4da Revert "Support dynamic Mojo Core on Linux"
This reverts commit 002e044483.

Reason for revert: <INSERT REASONING HERE>
It looks like this CL breaks build:
https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests/19458?blamelist=1#blamelist-tab

Original change's description:
> Support dynamic Mojo Core on Linux
> 
> This introduces a new --mojo-core-library-path Content switch which
> instructs Content to initialize each process with an implementation
> of Mojo Core found in the referenced shared library rather than using
> the version linked into the main binary.
> 
> This allows for IPC interoperability between a Content embedder and
> another application which provides its own copy of Mojo Core.
> 
> Fixed: 1082473
> Change-Id: I1e50c505e91a53e60056a4b8c691d91728f7a5ea
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229664
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#778002}

TBR=avi@chromium.org,rockot@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I70d8f420bdaafd1e8f27b3c36a422de4ee8e68ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2245413
Reviewed-by: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778176}
2020-06-15 03:27:29 +00:00
Ken Rockot
002e044483 Support dynamic Mojo Core on Linux
This introduces a new --mojo-core-library-path Content switch which
instructs Content to initialize each process with an implementation
of Mojo Core found in the referenced shared library rather than using
the version linked into the main binary.

This allows for IPC interoperability between a Content embedder and
another application which provides its own copy of Mojo Core.

Fixed: 1082473
Change-Id: I1e50c505e91a53e60056a4b8c691d91728f7a5ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229664
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#778002}
2020-06-12 23:15:14 +00:00
Bo Liu
ae5b6def06 Dump gpu process on establish channel timeout
Android has a browser-side timeout for establish channel which is
usually the  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}
2020-06-01 19:44:51 +00:00
Gabriel Charette
e7cdc5cd07 [BrowserThread] Migration callers without full content:: namespace
Note to QA: This CL is purely mechanical and shouldn't be blamed
for future regressions on touched files.

This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/2211138
which already removed all usage using content::BrowserThread.

Hence this script now matches unqualified BrowserThread:: without
risking having "content::" be selected as "traits_before" by the regex
(ran on same revision as step ).

content:: is now always added if outside namespace content {}
(deleting unused using content::BrowserThread; decls)

Script @ https://crbug.com/1026641#c92

(will TBR fdoray@ post-review for mechanical change)
TBR=fdoray@hchromium.org

AX-Relnotes: n/a.
Bug: 1026641
Change-Id: I51ae2f83eb17d19b54563fd9b4fc040d2aa0c948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212469
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772458}
2020-05-27 23:35:05 +00:00
ssid
b13f3a964c Create background tracing agent in all child processes.
The agent was only created in renderer processes earlier.

Change-Id: I7238a73d2c8d9b0ba1c5b52d9acfd4161c5cac91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2208081
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: ssid <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771902}
2020-05-26 18:58:12 +00:00
ssid
feb655b62c Move memory instrumentation service to memory infra thread
The service performs expensive computations on UI thread in both browser
and renderer processes. The computation of VM regions, creating OS
memory dump, graph computation of chrome dumps are all expensive. So,
this moves the coordinator and clients to memory-infra thread which is
created for this purpose.

Change-Id: I6da7e5a0a8d6f8e4b91b8071bf464fb9eaced2ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2109457
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: ssid <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753697}
2020-03-26 18:37:41 +00:00
Lukasz Anforowicz
ed5d6c2e8c Use "mojo-message-error" instead of "bad_message_reason" crash key name.
NetworkService was incorrectly using "bad_message_reason" crash key name
when reporting a bad mojo message.  This CL switches to using the
correct "mojo-message-error" name (one that is recognized by the crash
analysis services).  This CL also moves the crash key definition to the
//mojo layer, so that it can be reused both from //content and from
//services/network.

Bug: 987986
Change-Id: I772ae563df2f62ea430235524397b8492455de23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2118690
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753484}
2020-03-26 02:18:50 +00:00
Lukasz Anforowicz
0d5c120800 Call DwoC synchronously from BrowserChildProcessHostImpl::OnMojoError.
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}
2020-03-18 21:10:05 +00:00
Bo Liu
ac13a4b9cb android: Do not clean_exit as crash
Android specifically generally do not use exit_code or TerminationStatus
to communicate how a "child" process exited. Android does not have real
child processes; they are separate service processes forked from
android's zygote.

One scenario that is correctly detected is if the child process exists
cleanly by quitting its main loop. So avoid treating case this in
BrowserChildProcessHostImpl as a crash. This is in preparation fo
cleanly shutting down the gpu process when not in need.

Not Android will still call NotifyProcessKilled. NotifyProcessKilled is
used more like a general process exited notification due to the reasons
above, so keep calling it.

Bug: 1058509
Change-Id: I07102e7ddbec7d68c8ce3d3ffaf5a3d56a4309fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100729
Reviewed-by: ssid <ssid@chromium.org>
Commit-Queue: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749951}
2020-03-12 23:20:42 +00:00
Alex Gough
74c20b08f1 Adds SandboxType to chrome://sandbox on Windows
This should be useful as more services with finer grained sandboxing
are introduced.

Bug: 997273
Change-Id: I2996c8b32fa9f46bd1a32aa7b80d99d094f020a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2006129
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732724}
2020-01-17 05:13:58 +00:00
Ken Rockot
8cb47e1970 Fix Resource Coordinator client registration
Child processes send a message to BrowserChildProcessHostImpl to
have the host register Resource Coordinator client pipes on their
behalf.

The implementation of this message accesses the corresponding
ChildProcessLauncher's PID indiscriminately. Meanwhile the process
may have died by the time the message is actually dispatched, and
it's invalid to access that PID after process termination.

While this race doesn't seem to affect security or stability of
production code in practice, it does cause browser tests to hit
a DCHECK on PID access, causing fairly common flake.

This fixes the race by ensuring the Process is still valid before
attempting to grab its PID.

Fixed: 1029627
Change-Id: I3f8eb6e9f6cd5c94c4011b76446e7fce63c0d12c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944618
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721726}
2019-12-04 23:24:30 +00:00
Ken Rockot
a7f8fed28b Reland "Move Utility processes off Service Manager"
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}
2019-12-04 06:17:31 +00:00
Ken Rockot
8dda8888b4 Reland "Reland "Move Renderer processes off Service Manager""
This reverts commit d10a4fc5f2.

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 "Reland "Move Renderer processes off Service Manager""
> 
> 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}

TBR=avi@chromium.org,boliu@chromium.org,rockot@google.com,nya@chromium.org,mbarbella@chromium.org,rsesek@chromium.org,yucliu@chromium.org

Change-Id: I69de741d907abd790bdad3019abeeb9a8ca231aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1028852, 977637
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949778
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721377}
2019-12-04 05:56:22 +00:00
Shuhei Takahashi
d10a4fc5f2 Revert "Reland "Move Renderer processes off Service Manager""
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}
2019-12-03 13:35:16 +00:00
Shuhei Takahashi
bfca6c8096 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}
2019-12-03 13:33:33 +00:00
Ken Rockot
0a311ff4af 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}
2019-11-22 23:51:31 +00:00
Ken Rockot
881a65d746 Reland "Move Renderer processes off Service Manager"
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}
2019-11-22 22:49:07 +00:00