0
Commit Graph

293 Commits

Author SHA1 Message Date
Peter Boström
fc7ddc185b Migrate to NOTREACHED() in content/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now.
The former is [[noreturn]] so this CL also performs dead-code removal
after the NOTREACHED().

This CL does not attempt to do additional rewrites of any surrounding
code, like:

if (!foo) {
  NOTREACHED();
}

to CHECK(foo);

Those transforms take a non-trivial amount of time (and there are
thousands of instances). Cleanup can be left as an exercise for the
reader.

This does clean up kCrashOnDanglingBrowserContext as both paths of the
kill switch are currently fatal. This has been rolled out for a long
time.

Bug: 40580068, 40062641
Change-Id: Ib88e710d003e2e48df3fc502ca54d2341d157a0e
Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel
Low-Coverage-Reason: OTHER Should-be-unreachable code
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5974816
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1376522}
2024-10-31 19:37:21 +00:00
Alex Gough
28df8180bb Drop Windows support for PPAPI sandbox type
This sandbox type is not used in any released version of
Chrome and is not tested on the CQ so we cannot be
certain going forward that the sandbox is effective.

If developers use `enable_ppapi=true` the ppapi host
process will now be unsandboxed. This is not a security
regression as the flag is not intended for use in
released versions of Chrome.

A guard is added to ppapi/build.gn to ensure this configuration
cannot be enabled in official Chrome builds.

Bug: 40511450, b/303417958
Change-Id: Iefbd866727da02aa1baf3ab08b5b20d2d62c7279
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5840808
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1359238}
2024-09-24 08:37:45 +00:00
Etienne Pierre-doray
25723fabb2 [tracing] Forward startup tracing config as shmem
Using base::shared_memory::AddToLaunchParameters() to
send config in a shmem at child process creation.

Related changes:
- Some reordering of operations in early startup to ensure dependencies
  are in place.
- TraceStartupConfig holds a perfetto::TraceConfig instead of
  a base::TraceConfig

Change-Id: Ic10f5e7cda39cd953bda5f08b617c4e4568a7773
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5581006
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320942}
2024-06-28 14:05:57 +00:00
Tomasz Moniuszko
3b61e51438 Avoid time zone changes from TimeZoneMonitor in test
Fixes test failure when machine is not in "America/Los_Angeles" time
zone.

Before this CL, ScopedTimeZone was changing the ICU's time zone to
America/Los_Angeles, and was adding kTimeZoneForTesting to command-line
so time zone was propagated to newly spawned renderer processes.
But TimeZoneMonitor is platform-specific and reads the current time
zone from the OS. It sends that time zone to each its client (renderer
process) and it was replacing the testing time zone
(America/Los_Angeles) with the OS time zone in the renderer process.

This CL introduces FakeTimeZoneMonitor which doesn't read the time zone
from the OS. It doesn't change the current ICU's time zone but still
sends it to newly spawned renderer processes. This makes
kTimeZoneForTesting switch redundant.

ScopedTimeZone changes the time zone but now also overrides the
TimeZoneMonitor binder in DeviceService so FakeTimeZoneMonitor is
created instead of the real TimeZoneMonitor. DeviceService and
TimeZoneMonitor are created very early during the test setup and we
need to override binder before that happens. It's too late to override
TimeZoneMonitor binder in ViewerPropertiesDialog test case because the
real TimeZoneMonitor already exists at this point and
FakeTimeZoneMonitor won't be created and used.

TEST=All/PDFExtensionPacificTimeZoneJSTest.ViewerPropertiesDialog/*

Bug: 340983077
Change-Id: I499763675d879b764e848e5358813c111adce9e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5542444
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Andy Phan <andyphan@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305535}
2024-05-24 06:42:07 +00:00
Peter Boström
8472105d01 Use NOTREACHED_IN_MIGRATION() in content/
This was generated by replacing "  NOTREACHED()" with
"  NOTREACHED_IN_MIGRATION()" and running git cl format.

This prepares for making NOTREACHED() [[noreturn]] alongside
NotReachedIsFatal migration of existing inventory.

Bug: 40580068
Change-Id: I3b48b89911ac5e9ffcb211622992f917f8f9e8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5539619
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1301096}
2024-05-15 04:36:02 +00:00
Samuel Attard
eeb055c046 add missing app_launch_prefetch namespace in ppapi_process_host
Issue landed in https://chromium-review.googlesource.com/c/chromium/src/+/5420149

Bug: 40946432, 325307453
Change-Id: Icf8ddd2ad7d659a09dbcad83d6008aecb3d822f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5517613
Reviewed-by: Sean Maher <spvw@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297534}
2024-05-07 16:13:06 +00:00
Sean Maher
2dcbd781ed reland: Move windows prefetch code to //components/app_launch_prefetch
This is to permit calling from chrome-agnostic locations including GPU
and crashpad.

Original revert was because we were accessing FeatureList in the
crashpad process, which does not create a FeatureList. The crash was
fixed with a new check to ensure a FeatureList is created before
checking for the ExpandedPrefetchRange feature; otherwise, proceed as if
the feature is disabled.

This is a sufficient solution, because the startups which were seen to
cause issues (crashpad and crashpad fallback, prefetch slots 4 and 7
respectively) are not changed under ExpandedPrefetchRange, and so
the feature need not be initialized for those launches.

Bug: 40946432, 325307453
Change-Id: Ia056650cf59c82b4a09608cdfefdf47515d7e7d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5420149
Commit-Queue: Sean Maher <spvw@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1291364}
2024-04-23 17:03:55 +00:00
Peng Huang
acc30f7cf5 Revert "Reland: Move windows prefetch code to //components/app_launch_prefetch"
This reverts commit 6e04f2a49c.

Reason for revert: crash on Windows
[0227/095220.580:FATAL:feature_list.cc(108)] Check failed: !feature. Accessed feature ExpandedPrefetchRange before FeatureList registration.

Original change's description:
> Reland: Move windows prefetch code to //components/app_launch_prefetch
>
> This relands crrev.com/c/5238168. It fixes the bug where the FeatureList
> was accessed from Crashpad before initialization during certain tests.
>
> This is to permit calling from chrome-agnostic locations including GPU
> and crashpad.
>
> Bug: 40946432, 325307453
> Fixed: 325473318
> Change-Id: I5861968256fb1e857423e3f92adfea195914ed7e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5317853
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Commit-Queue: Sean Maher <spvw@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1265282}

Bug: 40946432, 325307453
Change-Id: Id1ee64c03bde07490be29caa868d5b032a1aee7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5323354
Auto-Submit: Peng Huang <penghuang@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1266672}
2024-02-28 22:15:20 +00:00
Sean Maher
6e04f2a49c Reland: Move windows prefetch code to //components/app_launch_prefetch
This relands crrev.com/c/5238168. It fixes the bug where the FeatureList
was accessed from Crashpad before initialization during certain tests.

This is to permit calling from chrome-agnostic locations including GPU
and crashpad.

Bug: 40946432, 325307453
Fixed: 325473318
Change-Id: I5861968256fb1e857423e3f92adfea195914ed7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5317853
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1265282}
2024-02-26 17:46:37 +00:00
Brian Sheedy
6803a864f0 Revert "Move windows prefetch code to //components/app_launch_prefetch"
This reverts commit e9c2334b7f.

Reason for revert: Causing crashes in some GPU tests
crbug.com/325473318

Original change's description:
> Move windows prefetch code to //components/app_launch_prefetch
>
> This is to permit calling from chrome-agnostic locations including GPU
> and crashpad.
>
> Bug: 40946432, 325307453
> Change-Id: I9181d3bb2b5fbb11bcba19b5a4c1473d682cbff8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238168
> Reviewed-by: Alexander Timin <altimin@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
> Commit-Queue: Sean Maher <spvw@chromium.org>
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1260729}

Bug: 40946432, 325307453, 325473318
Change-Id: I70018070eb596eced2767a3437882e128715f944
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5301305
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1261323}
2024-02-15 21:51:58 +00:00
Sean Maher
e9c2334b7f Move windows prefetch code to //components/app_launch_prefetch
This is to permit calling from chrome-agnostic locations including GPU
and crashpad.

Bug: 40946432, 325307453
Change-Id: I9181d3bb2b5fbb11bcba19b5a4c1473d682cbff8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5238168
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sean Maher <spvw@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1260729}
2024-02-14 21:56:25 +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
Joe Laughlin
a78cce0554 Expand Windows /prefetch:N range for Windows 11 21H2 and later.
The /prefetch parameter is used to differentiate different file
access patterns for the same process name. The range was 1..8,
it is now 1..16 for Windows 11 and later allowing for better
process separation, especially for renderers, and utility processes.

Bug: 1505793
Change-Id: I3adefbb3e220e7113b320a14fd298329d1dddcbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5024734
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Joe Laughlin <joel@microsoft.com>
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1243674}
2024-01-05 23:58:50 +00:00
Lei Zhang
9c0ef1515d Switch to the span version of CommandLine::CopySwitchesFrom() in content
Use the span version of CopySwitchesFrom() to simplify the callers.
Along the way, make some switches constants truly const and fix a sign
issue in ui/gl/gl_switches.h that prevents a span construction from
working.

Bug: 1462705
Change-Id: Icccd16c942ea34810d8ca9be5d9d104a9e91412f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4673623
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1167650}
2023-07-07 21:42:59 +00:00
Avi Drissman
adac219925 Update header includes for /base/functional in /content
bind.h, callback.h, callback_forward.h, and callback_helpers.h
moved into /base/functional/. Update the include paths to
directly include them in their new location.

Bug: 1364441
Change-Id: I32ec425b9c0e52ec4b50047bf3290fecc5c905ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4148554
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091567}
2023-01-11 23:46:39 +00:00
Will Harris
cd57b83d9f Move ChildProcessHost* from content/common to content/browser
This is a prerequisite for moving a browser-only API that is
used by ChildProcessHostImpl from common to browser.

BUG=1402942

Change-Id: I6eea0952e6bf1ef30498b6f465067e599ea0ff53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4134795
Commit-Queue: Will Harris <wfh@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Owners-Override: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1089401}
2023-01-05 20:03:10 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
K. Moon
67441a1b5b Rename PepperPluginInfo to ContentPluginInfo
Renames PepperPluginInfo to ContentPluginInfo, in order to reflect that
this struct no longer is used only with PPAPI.

The name ContentPluginInfo was chosen because the name PluginInfo is
overloaded already for 3 different types in Chromium. The name also
emphasizes that this type supports the //content layer specifically.

Most of this change is mechanical, with the following exceptions:

1. Some other names have been changed to drop references to Pepper, such
   as renaming ContentClient::AddPepperPlugins() to
   ContentClient::AddPlugins(). Note that Pepper-specific functions like
   MakePepperPluginInfo() intentionally still mention Pepper.
2. Refactored PluginManager::UpdatePluginListWithNaClModules() to use
   range-based "for" loops, instead of iterators.

Bug: 1344644
Change-Id: I9b8596f6a53593ed7c4b7e06a266b57c82b0d9bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3835746
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1040827}
2022-08-30 07:26:43 +00:00
Alex Gough
ee0b28caa8 PpapiPermissions are not used by the sandbox delegate
ppapi::PpapiPermissions are not used by the delegate and it is
unlikely that they will be used in future. The parameter can be
removed.

Bug: 1270309
Tests: content_unittests --gtest_filter=PpapiPluginSandboxSettings*
Change-Id: Ib3173a314bdec9fb158850b361b433c2305a3432
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3553188
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987291}
2022-03-31 00:59:34 +00:00
Daniel Cheng
ad44af2f53 Migrate base::{size,empty,data} to STL equivalents in //content.
Bug: 1299695
Change-Id: Iefec40ecc9327c04732785eaed5a3214d17e552f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3491685
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975485}
2022-02-26 18:07:54 +00:00
Xiaohan Wang
1ecfd006fd content: Use BUILDFLAG for OS checking
Use BUILDFLAG(IS_XXX) instead of defined(OS_XXX).

Generated by `os_buildflag_migration.py` (https://crrev.com/c/3311983).

R=thakis@chromium.org

Bug: 1234043
Test: No functionality change
Change-Id: Ia0eae6f9396065e190929d42600012c9324c07e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3399774
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Owners-Override: Xiaohan Wang <xhwang@chromium.org>
Auto-Submit: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Owners-Override: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#961157}
2022-01-19 22:33:10 +00:00
Emily Andrews
5008b7f2d0 Move the PpapiPluginSandboxedProcessLauncherDelegate
This change moves the PpapiPluginSandboxedProcessLauncherDelegate into
it's own file so that it can be more testable.

Bug: 1274959
Change-Id: I9b47afdc22bd5c670da133a5f7f719291fc182cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3311700
Commit-Queue: Emily Andrews <emiled@microsoft.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#947228}
2021-12-01 22:40:43 +00:00
Keishi Hattori
0e45c020c4 Rewrite most Foo* field_ pointer fields to raw_ptr<Foo> field_.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA)/sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.

This commit was generated automatically, by running the following script: tools/clang/rewrite_raw_ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e

For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_ptr documentation in //base/memory/raw_ptr.md.

FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.

[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sharing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ

Binary-Size: Increase of around 500kb was approved for MiraclePtr
Include-Ci-Only-Tests: true
No-Tree-Checks: true
No-Presubmit: true
Bug: 1272324, 1073933
Change-Id: I05c86a83bbb4b3f4b017f361dd7f4e7437697f69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3305132
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Owners-Override: Bartek Nowierski <bartekn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#945735}
2021-11-27 09:25:52 +00:00
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
Alex Gough
eb6a38f6fa Replace sandbox::policy::SandboxType with mojom Sandbox enum
sandbox.mojom.Sandbox can now be used as the sandbox type so we
replace it everywhere.

The guts of the change are in //sandbox/policy/sandbox_type.h where
SandboxType is now deleted, and //sandbox/policy/mojom/sandbox.mojom
where sandbox types that are not already used in mojom ServiceSandbox
attributes are added.

Some cascading changes:-

 - kService wasn't implemented on Mac (as it is equivalent to kUtility).
 As we cannot alias enum fields in mojo like we can in C++ I have added
 kService for Mac. The alternative is to define platform specific
 ServiceSandbox attributes for all kService interfaces which seems to
 put this complexity in the wrong place.
 - sandbox_type.h included a number of buildflag headers that other files
 then relied on. As sandbox_type.h is no longer needed in many places
 and no longer needs these defines, they have been introduced where
 required.
 - sandbox::mojom::Sandbox is forward declared in a couple of headers
 that are widely imported, hopefully reducing the number of times the
 mojom.h is included but not used.
 - some build deps must be modified.
 - LibAssistantService needs a sandbox to be defined even when hosted
 in process, so has kNoSandbox now when enable_cros_libassistant is
 false.

Bug: 1210301
Change-Id: I13fa4fa8cbbb3090a38806fe5532787bbdf1e2fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3213677
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Sean Topping <seantopping@chromium.org>
Reviewed-by: Filip Gorski <fgorski@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Tao Wu <wutao@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#934126}
2021-10-22 01:55:13 +00:00
Peter Boström
828b902994 Replace DISALLOW_COPY_AND_ASSIGN in content/
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

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

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

Bug: 1010217
Change-Id: Iea478401b7580682c7b9f195f7af9cbbdb6ce315
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167292
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923194}
2021-09-21 02:28:43 +00:00
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
8e6e2d5f64 Add a multi-process time zone scoper for testing.
The base::test::ScopedRestoreDefaultTimezone class works fine for
single-process tests, and for multi-process tests on Linux. On Linux,
where zygotes are normally enabled, zygotes will pass the browser time
zone to newly spawned processes, but this is an implementation detail.

To make scoped time zone changes work across platform, add a new
content::ScopedTimeZone class that:

1) Wraps base::test::ScopedRestoreDefaultTimezone.
2) Changes the command line within its scope to have
  --time-zone-for-testing=new_zoneid.

Then change child processes to read the value of this command line
switch and apply it. Use it in pdf_extension_test.cc to make a test case
more reliably pass independent of the host machine's time zone.

Note that the scoper only affects the running process and any child
processes it creates. Other existing processes are not affected.

Bug: 1199021
Change-Id: I18f82007598e37a873126cb0716c8321d159ef8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2795988
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872683}
2021-04-15 03:08:11 +00:00
John Abd-El-Malek
38963ea404 Remove PepperMessageFilter since the remaining IPC can now be handled in child processes.
Certificate parsing now doesn't depend on the OS so can happen in child processes. To avoid introducing a dependency on net/ in NaCl, make this private API not be part of NaCl since it was added for Flash. It looks like this can be removed as a result, but I'll leave this as a separate task in bug 1064652 along other Flash-only APIs.

This allows removal of BrowserMessageFilter for non-renderer child processe, since as implemented now they don't work with ChildProcessHostImpl.

Bug: 904556
Change-Id: Ic4ea8871097eb69108e484ab6f8ec6c868aff38a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2808690
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#870202}
2021-04-07 21:11:33 +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
Robert Sesek
46e23c8166 mac: Enable process-wide CPU mitigations where available.
The existing mitigation flag is per-thread, so this offers stronger
protections. The thread-specific mitigation will remain enabled in
order to support older macOS versions. The new process-wide flag does
not conflict with it (task takes precedence over thread).

The posix_spawnattr option is used instead of the libproc API, because
the latter requires permitting (allow system-sched (target self)) in the
sandbox, which would grant additional capabilities beyond the CPU
mitigations control.

Bug: 1129602
Change-Id: I876f2aae3a3e26a622c67ad181efbdfd91fa8b76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2722913
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#858301}
2021-02-26 22:19:47 +00:00
Peter Kasting
57fd6de4e6 Work toward getting components_unittests building with u16string.
Bug: 911896
Change-Id: I8507de39c5696536a3079eb1efbec4476bc24a1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2657435
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#848298}
2021-01-28 23:05:39 +00:00
James Forshaw
4d5a809b02 [Flash]: Remove support for OPM redirection from Windows sandbox.
This CL removes the support for redirecting the OPM APIs when running
under Win32K lockdown. These were added to allow Flash to enable HDCP
and with Widevine moving to a utility process are no longer required.

Bug: 1148912
Change-Id: Ia5ec0cd54d9ae6fec28b5603693ffde7c725f194
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536847
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: James Forshaw <forshaw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827960}
2020-11-16 23:03:47 +00:00
Dave Tapuska
32dcd8a65c Remove Pepper Plugin Throttling.
This is the browser side change of removing pepper throttling.
Since flash is no longer loaded and the throttling code was specific
for flash it can be removed.

Renderer side was done in
https://chromium-review.googlesource.com/c/chromium/src/+/2508289

BUG=1143755,993189

Change-Id: I8eed030decf312ba7e60874428d817ebf7983220
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508430
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823272}
2020-11-02 20:22:08 +00:00
Bill Budge
1d71c85d74 [Flash] Delete PPB_Broker_Trusted, PPP_Broker APIs
- Removes PPB_Broker_Trusted and PPP_Broker APIs.
- Removes Broker related messages and browser implementation.
- Removes kPpapiBrokerProcess and kPpapiFlashArgs content flags.
- Removes kPpapiBrokerProcess Sandbox flag. No plugin processes
  can generate executable code.
- Removes PluginGlobals::GetCmdLine method.

Bug: chromium:1064652,chromium:1133894,chromium:1133887
Change-Id: I697aeae388f1d14edcb737579830a35fcac390f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2473438
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817905}
2020-10-16 14:00:26 +00:00
Sean McAllister
0d73ca3d80 Refactor OS_LINUX preprocessor directive for LaCrOS effort.
Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

Bug: 1110266
Change-Id: Iebbe654853bebeb4af49c9cb793dae5938416f3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351374
Commit-Queue: Sean McAllister <smcallis@google.com>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Becca Hughes <beccahughes@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Mike Wittman <wittman@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799710}
2020-08-19 17:54:37 +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
Alex Gough
cafd683955 Remove disable-win32-lockdown flag.
Flag is no longer required (e.g. no reports in crash/).

Lockdown is only enabled if supported so it is not necessary to check
for support before enabling lockdown. However, some parts of the code
behave differently on Windows 7 where lockdown is not supported so
checks are now made on the platform version.

bug: 1059451
Change-Id: Ib3cd6311bfd5374c130f17c84ce9bdfb82512614
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268538
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787288}
2020-07-10 17:58:05 +00:00
Robert Sesek
7d0b49b0aa Move //services/service_manager/sandbox to //sandbox/policy.
Originally the sandbox policies lived in //content, but with
servicification this would create unwanted dependencies between
//services and //content. Instead, create a new //sandbox/policy
library to hold the sandbox integration code. This library can depend
on the low-level //sandbox routines, but not nice versa.

Tbr: ajgo@chromium.org (mechanical change rule)
Bug: 1097376
Change-Id: I1ca9ac0015a625197f2d3aae104e8f7aa78dcfd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2272609
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786385}
2020-07-08 18:31:27 +00:00
Robert Sesek
8621aef06a Move zygote from //services/service_manager back to //content
This effectively reverts 668c097f9a.

Bug: 1097376
Change-Id: I6dfe3300315bbee65bcc0d18fb26a0afa46a61f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252466
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782545}
2020-06-25 18:17:37 +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
Will Harris
24b92879a7 MacOS: Disable JIT entitlement for non-Flash plugin processes.
BUG=961831

Change-Id: Iaf98c71732e029d68cc6e97d5f9911676a154bd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079649
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746883}
2020-03-04 19:22:45 +00:00
Alex Gough
9ab468a6c3 Use enum class for service_manager::SandboxType.
Removes unused kNaClLoader (was PROCESS_TYPE_NACL_LOADER)
from Windows as these are in fact Ppapi (PPAPI) sandbox types.

Removes unused values from SandboxType enum and replaces default cases.

SandboxType is not used for iteration so these boundary values are removed
from the SandboxType enum.

The kInvalid SandboxType is retained as it is used as an error case in
a couple of places. It might be possible to remove this in the future.

This removes default cases from switch statements where it might make
sense to have a notification in future when new sandbox types are added.
In these cases the default case is replaced with all otherwise
unchecked cases, so retaining the existing behavior.

Change-Id: I76ffc8ae617f3f8fa9aa68236551ebcfa4cce32f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1938076
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723425}
2019-12-10 19:10:22 +00:00
Ken Rockot
10bca42360 Reland "Move GPU and Plugin processes off Service Manager"
This is a reland of bdc395526e

Original change's description:
> Move GPU and Plugin processes off Service Manager
>
> This introduces a new mode for Browser/ChildProcessHost where the
> primordial pipe is a simple content.mojom.ChildProcess pipe. This will
> become the new default mode of operation for child processes, and
> eventually will be the only mode of operation once NaCl processes are
> gone.
>
> GPU and plugin processes are ported to this mode here since both
> require only minimal changes. This means that "content_gpu" and
> "content_plugin" services no longer exist.
>
> Bug: 977637
> Change-Id: I39c5d2284bd84246663d5f0eb4cbab3b3483d798
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918326
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717857}

NOPRESUBMIT=true

Bug: 977637
Change-Id: Iaefab7950d7f0437b05417a34ff2b1db73576f0b
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948907
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#721374}
2019-12-04 05:47:59 +00:00
Shuhei Takahashi
ee7c1784c1 Revert "Move GPU and Plugin processes off Service Manager"
This reverts commit bdc395526e.

Reason for revert: breaks graphics on some Chrome OS devices.

Original change's description:
> Move GPU and Plugin processes off Service Manager
>
> This introduces a new mode for Browser/ChildProcessHost where the
> primordial pipe is a simple content.mojom.ChildProcess pipe. This will
> become the new default mode of operation for child processes, and
> eventually will be the only mode of operation once NaCl processes are
> gone.
>
> GPU and plugin processes are ported to this mode here since both
> require only minimal changes. This means that "content_gpu" and
> "content_plugin" services no longer exist.
>
> Bug: 977637
> Change-Id: I39c5d2284bd84246663d5f0eb4cbab3b3483d798
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918326
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Ken Rockot <rockot@google.com>
> Cr-Commit-Position: refs/heads/master@{#717857}

NOPRESUBMIT=true

Bug: 1028852
Bug: 977637
Tbr: rockot@google.com
Tbr: avi@chromium.org
Tbr: rsesek@chromium.org
Change-Id: I21259f3cf7718ad940cafba4a56d9349412d3b74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948664
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720940}
2019-12-03 13:37:16 +00:00
Ken Rockot
bdc395526e Move GPU and Plugin processes off Service Manager
This introduces a new mode for Browser/ChildProcessHost where the
primordial pipe is a simple content.mojom.ChildProcess pipe. This will
become the new default mode of operation for child processes, and
eventually will be the only mode of operation once NaCl processes are
gone.

GPU and plugin processes are ported to this mode here since both
require only minimal changes. This means that "content_gpu" and
"content_plugin" services no longer exist.

Bug: 977637
Change-Id: I39c5d2284bd84246663d5f0eb4cbab3b3483d798
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918326
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#717857}
2019-11-21 22:52:43 +00:00
Hans Wennborg
5ffd1393b3 Include bloat: reduce number of includes in content_browser_client.h
This reduces the number of preprocessor tokens in
content_browser_client.h from 1,335,281 to 754,474. Since this is a
widely included file, reducing build times a fair bit (see bug).

TBR=tsepez for content/browser/child_process_security_policy_*

Bug: 1014009
Change-Id: Id3c2de29f5b08cab80820d01aff722afeb1618e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857126
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706388}
2019-10-16 11:00:02 +00:00
Robert Sesek
4fed6f1e6a Split some Mojo binding sites into _receiver_bindings files under SECURITY_OWNERS review.
With the Service Manager going away, the manifest files that previously
mediated access to Mojo services across processes are going away too.
Under the new system, various //content classes have methods that bind
mojo::Receiver<T> objects via GenericPendingReceiver. Since these call
sites control access to objects across a privilege boundary, they should
be under the SECURITY_OWNERS review system.

This first pass splits out several //content and //chrome ones, but
more to come.

Bug: 1012033
Change-Id: Ic09c825c8503c570393fa7ce4d89b58bb6efe391
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848416
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706219}
2019-10-15 23:31:01 +00:00
Sami Kyostila
dd9428771e Reland "base: Remove temporary "WithTraits" task API wrappers"
This is a reland of 0bf621ef56

Original change's description:
> base: Remove temporary "WithTraits" task API wrappers
>
> Now that everyone has been migrated to the renamed
> PostTask/CreateTaskRunner APIs, we can remove these temporary wrappers.
>
> TBR=gab@chromium.org
> (to apply side-effects of mechanical change in //base)
>
> Bug: 968047
> Change-Id: I69c53abd899f37586f23ec295ffcc9bf12042c4a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752787
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
> Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#693695}

TBR=gab@chromium.org
(reland without changes)

Bug: 968047
Change-Id: I1969ecad2af1527b14e4c8160e16156cde31cf45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1790105
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694755}
2019-09-09 14:42:43 +00:00