0
Commit Graph

33 Commits

Author SHA1 Message Date
Dan McArdle
0c085b21fd Fix numeric edge cases when parsing "net-log-max-size-mb" flag
This CL makes the following changes:

* Renames GetNetMaximumFileSizeFromCommandLine() to
          GetNetLogMaximumFileSizeFromCommandLine().

* Changes its return type from int64_t to uint64_t, because it may
  return the maximum uint64_t value.

* Adds an explicit cast to uint64_t before shifting. This fixes parsing
  for values >= 2**12.

* Adds test coverage, including a regression test for the linked bug.

Bug: 352496169
Change-Id: Ifd44fe4a1b58f83ba806753899e2e55ad02b37b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5695988
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326747}
2024-07-12 14:15:23 +00:00
John Abd-El-Malek
f2592dba26 Reduce large includes in storage_partition_impl.h
The issue is that render_frame_host_impl.h is very large [1], and the biggest include by an order of a magnitude is storage_partition_impl.h. The biggest two includes there by more than an order of a magnitude are network_context.mojom and cert_verifier_service.mojom [2]. The former is needed because StoragePartitionImpl derives from NetworkContextClient, which this cl moves to a separate mojom, and mojo::Remote<NetworkContext> which is moved to a forward declared inner class. The latter is needed for CertVerifierServiceUpdater which is likewise moved to its own file.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2024-02-08_120812.html#view=edges&filter=%5Econtent%2Fbrowser%2Frenderer_host%2Frender_frame_host_impl%5C.h%24&sort=asize&reverse=&includer=%5Econtent%2Fbrowser%2Frenderer_host%2Frender_frame_host_impl%5C.h%24&included=&limit=1000
[2] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Econtent%2Fbrowser%2Fstorage_partition_impl%5C.h%24&sort=asize&reverse=&includer=%5Econtent%2Fbrowser%2Fstorage_partition_impl%5C.h%24&included=&limit=1000

Bug: 324512302
Change-Id: I9ed249738f9a15f3415f8bae26c58565d9fbda78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5280714
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Owners-Override: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1259050}
2024-02-12 07:20:23 +00:00
Matt Mueller
f783962d1b Reapply "Refactor how additional certificates are configured."
Originally landed in commit 264e35de52
and was reverted in commit 9192ea3942 due
to a test failure.

Updated with changes to policy_certs_browsertest.cc to
address possible sources of flake.

Original CL description:
Previously they were set through CertVerifier::Config and passed into
CertVerifyProc::Verify on every verification attempt. This also means
they needed to be passed from the browser to the network service on
configuration, and then passed back to the cert verifier service on
every verification attempt.

The new flow stores them in the CertVerifyProc instance and uses the
CertVerifierWithUpdatableProc interface to update them.

(this CL borrows some of the CertVerifierServiceUpdater parts from https://chromium-review.googlesource.com/c/chromium/src/+/4909292)

Bug: 1477317,1427326,978854
Change-Id: Ia64c2af672dc29b473eaa11ad1f5b663ffeaf3b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5015687
Reviewed-by: Chris Thompson <cthomp@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Matt Mueller <mattm@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223813}
2023-11-13 20:23:15 +00:00
Matt Mueller
9192ea3942 Revert "Refactor how additional certificates are configured."
This reverts commit 264e35de52.

Reason for revert: Builder  linux-lacros-tester-rel is failing, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1500787

Original change's description:
> Refactor how additional certificates are configured.
>
> Previously they were set through CertVerifier::Config and passed into
> CertVerifyProc::Verify on every verification attempt. This also means
> they needed to be passed from the browser to the network service on
> configuration, and then passed back to the cert verifier service on
> every verification attempt.
>
> The new flow stores them in the CertVerifyProc instance and uses the
> CertVerifierWithUpdatableProc interface to update them.
>
> (this CL borrows some of the CertVerifierServiceUpdater parts from https://chromium-review.googlesource.com/c/chromium/src/+/4909292)
>
> Bug: 1477317,1427326,978854
> Change-Id: I802d1bb05e999b97bbbec2a80566ca7cf429b774
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4957815
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: David Trainor <dtrainor@chromium.org>
> Commit-Queue: Matt Mueller <mattm@chromium.org>
> Reviewed-by: Matthew Denton <mpdenton@chromium.org>
> Reviewed-by: Ken Buchanan <kenrb@chromium.org>
> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1221751}

Bug: 1477317,1427326,978854, 1500719
Change-Id: I92e840223dea1298a4570ce7ddf1490add0d7986
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5014407
Auto-Submit: Sophia Lin <sophialin@google.com>
Reviewed-by: Sophia Lin <sophialin@google.com>
Owners-Override: Sophia Lin <sophialin@google.com>
Commit-Queue: Sophia Lin <sophialin@google.com>
Cr-Commit-Position: refs/heads/main@{#1221994}
2023-11-09 00:56:42 +00:00
Matt Mueller
264e35de52 Refactor how additional certificates are configured.
Previously they were set through CertVerifier::Config and passed into
CertVerifyProc::Verify on every verification attempt. This also means
they needed to be passed from the browser to the network service on
configuration, and then passed back to the cert verifier service on
every verification attempt.

The new flow stores them in the CertVerifyProc instance and uses the
CertVerifierWithUpdatableProc interface to update them.

(this CL borrows some of the CertVerifierServiceUpdater parts from https://chromium-review.googlesource.com/c/chromium/src/+/4909292)

Bug: 1477317,1427326,978854
Change-Id: I802d1bb05e999b97bbbec2a80566ca7cf429b774
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4957815
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Matt Mueller <mattm@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1221751}
2023-11-08 18:28:48 +00:00
Matthew Denton
095b69776b Remove duplication of RegisterNetworkServiceCrashHandler()
OnRestartNetworkServiceForTesting() ran a callback when the network
service was deliberately restarted. RegisterNetworkServiceCrashHandler()
ran a stack of callback handlers whenever the network service crashed.

The crash handlers wouldn't run when the network service was
deliberately restarted, but they probably should. And
OnRestartNetworkServiceForTesting() didn't allow registering multiple
callbacks. This CL combines the two functions into one.

The resulting RegisterNetworkServiceProcessGoneHandler() will be
useful for components that want to configure the network service, and
need to resend the configuration every time the network service
restarts.

Change-Id: I26a5c5a2849d0eb8878864738005d2376f372d80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4990533
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1219135}
2023-11-02 21:56:17 +00:00
Yoichi Osato
ccb0837af8 Remove empty network service
Since the  project is canceled.

Bug: 1448414, 1487447
Change-Id: I15f21104842be9c633703dc339eb496550d008e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4904306
Auto-Submit: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1203874}
2023-10-02 08:34:37 +00:00
Matthew Denton
542c43cbdf Reland "Cros network service sandbox: Unsandboxed if kerberos is enabled"
This is a reland of commit 5dfa5d11f4

The new sandbox tests should be skipped if the sandbox is disabled
on the command line.

Original change's description:
> Cros network service sandbox: Unsandboxed if kerberos is enabled
>
> The Linux/cros network service sandbox is incompatible with kerberos.
> So, the network service will start unsandboxed if kerberos is
> enabled, regardless of feature state or enterprise policy.
>
> The KerberosEnabled enterprise policy can change at runtime. If it
> flips to enabled, shut down the network service so it restarts
> unsandboxed. This is not a sandbox hole because only admins
> can enable kerberos.
>
> Change-Id: I4ae1356f31c3f9182a0db803a2ee22ec7bd1744e
> Bug: 1079808
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4753004
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Reviewed-by: Matt Menke <mmenke@chromium.org>
> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1180982}

Bug: 1079808, 1473197
Change-Id: I877ff17df78e1d3d34f90ff95ebd0e8886b3cf2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4777750
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1185061}
2023-08-18 07:32:17 +00:00
Christos Froussios
e193949361 Revert "Cros network service sandbox: Unsandboxed if kerberos is enabled"
This reverts commit 5dfa5d11f4.

Reason for revert:
SystemNetworkContextManagerNetworkServiceSandboxEnabledBrowsertest.NetworkServiceRestartsUnsandboxedOnKerberosEnabled
is failing on Linux Chromium OS ASan LSan
First failure: https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20(1)/52807/overview

Original change's description:
> Cros network service sandbox: Unsandboxed if kerberos is enabled
>
> The Linux/cros network service sandbox is incompatible with kerberos.
> So, the network service will start unsandboxed if kerberos is
> enabled, regardless of feature state or enterprise policy.
>
> The KerberosEnabled enterprise policy can change at runtime. If it
> flips to enabled, shut down the network service so it restarts
> unsandboxed. This is not a sandbox hole because only admins
> can enable kerberos.
>
> Change-Id: I4ae1356f31c3f9182a0db803a2ee22ec7bd1744e
> Bug: 1079808
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4753004
> Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
> Reviewed-by: Matt Menke <mmenke@chromium.org>
> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1180982}

Bug: 1079808
Change-Id: Ida288eec87d64b363f7c68ce327e2904f00769ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4763626
Auto-Submit: Christos Froussios <cfroussios@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Christos Froussios <cfroussios@google.com>
Owners-Override: Christos Froussios <cfroussios@google.com>
Cr-Commit-Position: refs/heads/main@{#1181303}
2023-08-09 03:38:49 +00:00
Matthew Denton
5dfa5d11f4 Cros network service sandbox: Unsandboxed if kerberos is enabled
The Linux/cros network service sandbox is incompatible with kerberos.
So, the network service will start unsandboxed if kerberos is
enabled, regardless of feature state or enterprise policy.

The KerberosEnabled enterprise policy can change at runtime. If it
flips to enabled, shut down the network service so it restarts
unsandboxed. This is not a sandbox hole because only admins
can enable kerberos.

Change-Id: I4ae1356f31c3f9182a0db803a2ee22ec7bd1744e
Bug: 1079808
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4753004
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1180982}
2023-08-08 16:46:23 +00:00
Yoichi Osato
7c4c434604 Add empty network service for metrics
This CL adds empty network service out of process for measuring memory
impact on Android.
The empty network service lives on new utility process and virtually does
nothing (implementation is ~20 lines of code in c/u/services.cc.)
The empty service is enabled only if the canonical network service
is in process to see additional process overhead on Android.

Bug: 1395707
Change-Id: Ieb0902a87134d1ae0af56f6b9d7940944863e450
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4374282
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1143838}
2023-05-15 01:39:23 +00:00
Asami Doi
fe926740eb code health: remove expired Navigation.{CommitTimeout, IsSameProcess}.* histograms
This CL removes expired histograms:
- Navigation.CommitTimeout.NetworkServiceAvailability (expired as of M82)
- Navigation.CommitTimeout.NetworkServiceLastCrashTime (expired as of M82)
- Navigation.CommitTimeout.NetworkServicePingTime (expired as of M82)
- Navigation.CommitTimeout.Scheme (expired as of M82)
- Navigation.IsSameProcess.* (expired as of M85)

No behavior changes.

Bug: 1384581, 1088973
Change-Id: I1cac5483f960efcebc62f6839987c007bf987a5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4442185
Reviewed-by: Luc Nguyen <lucnguyen@google.com>
Commit-Queue: Asami Doi <asamidoi@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Auto-Submit: Asami Doi <asamidoi@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1134475}
2023-04-24 10:23:54 +00:00
Matthew Denton
09b7b4b509 Fix IsOutOfProcessNetworkService() in unit tests
In some unit tests, ForceCreateNetworkServiceDirectlyForTesting() but
ForceInProcessNetworkService(true) was not. So
IsOutOfProcessNetworkService() returned true even though it wasn't.
So have the former call the latter.

The NetworkService() constructor was using the existing of `registry_`
as an indication that the network service was out of process. That
also wasn't true. So just don't create a BinderRegistry if it's
unused (in the in-process case).

Bug: 1312226
Change-Id: I7aa319b5baa6017b2adf2d634ad22260f762b493
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4371542
Auto-Submit: Matthew Denton <mpdenton@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122903}
2023-03-28 09:02:49 +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
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
Will Harris
db1de62541 Reland "Add enterprise policy for enabling or disabling network sandbox."
This is a reland of a5f1ceaa8a

This additionally wraps the DCHECKs in DCHECK_IS_ON() to prevent
the compiler from complaining.

BYPASS_POLICY_COMPATIBILITY_CHECK=No suitable default exists.

Original change's description:
> Add enterprise policy for enabling or disabling network sandbox.
>
> This CL adds a new enterprise policy `NetworkServiceSandboxEnabled`
> for force enabling or disabling the network service sandbox.
>
> This allows enterprises to force enable now to get feedback on any
> potential future compatibility issues during rollout, and will also
> permit opting out of the sandbox if any third party compatibility
> issues are encountered after rollout.
>
> If this policy is not set, then the default from content will be
> used.
>
> This CL also removes some DCHECKs in sandbox as control of whether
> network service sandbox is enabled is now fully in content.
>
> BUG=841001
> BYPASS_POLICY_COMPATIBILITY_CHECK=No suitable default exists.
>
> Change-Id: Icdbbadd71a7b93fab947a00e1a14e6bedbb8c8f1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198860
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
> Commit-Queue: Will Harris <wfh@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#928449}

Bug: 841001
Change-Id: I528dab0c8c3a3584aca91e8e73638a6a074b0118
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207411
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928719}
2021-10-06 17:07:25 +00:00
Findit
c6ef8c291d Revert "Add enterprise policy for enabling or disabling network sandbox."
This reverts commit a5f1ceaa8a.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 928449 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2E1ZjFjZWFhOGFhNGU1N2VkM2Q3OGY2N2ZjYjQwNWEzYWY1NjAwYmUM

Sample Failed Build: https://ci.chromium.org/b/8834164055623906449

Sample Failed Step: compile

Original change's description:
> Add enterprise policy for enabling or disabling network sandbox.
>
> This CL adds a new enterprise policy `NetworkServiceSandboxEnabled`
> for force enabling or disabling the network service sandbox.
>
> This allows enterprises to force enable now to get feedback on any
> potential future compatibility issues during rollout, and will also
> permit opting out of the sandbox if any third party compatibility
> issues are encountered after rollout.
>
> If this policy is not set, then the default from content will be
> used.
>
> This CL also removes some DCHECKs in sandbox as control of whether
> network service sandbox is enabled is now fully in content.
>
> BUG=841001
> BYPASS_POLICY_COMPATIBILITY_CHECK=No suitable default exists.
>
> Change-Id: Icdbbadd71a7b93fab947a00e1a14e6bedbb8c8f1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198860
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Alex Gough <ajgo@chromium.org>
> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
> Commit-Queue: Will Harris <wfh@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#928449}


BUG=841001

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I882ff253998a41297b8901b577412a8bdb2cbed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3207369
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Owners-Override: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928461}
2021-10-06 01:46:26 +00:00
Will Harris
a5f1ceaa8a Add enterprise policy for enabling or disabling network sandbox.
This CL adds a new enterprise policy `NetworkServiceSandboxEnabled`
for force enabling or disabling the network service sandbox.

This allows enterprises to force enable now to get feedback on any
potential future compatibility issues during rollout, and will also
permit opting out of the sandbox if any third party compatibility
issues are encountered after rollout.

If this policy is not set, then the default from content will be
used.

This CL also removes some DCHECKs in sandbox as control of whether
network service sandbox is enabled is now fully in content.

BUG=841001
BYPASS_POLICY_COMPATIBILITY_CHECK=No suitable default exists.

Change-Id: Icdbbadd71a7b93fab947a00e1a14e6bedbb8c8f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3198860
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#928449}
2021-10-06 00:50:53 +00:00
Peter Kasting
b4ee3370fa Fix some IWYU errors in advance of removing some #includes.
Bug: 242216
Change-Id: Ia2b406e86e4989be41f9213e16f6c0bc04990aa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3009974
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898962}
2021-07-06 23:02:29 +00:00
Tsuyoshi Horo
fe599d98a1 Revert "Remove some unnecessary #includes."
This reverts commit aeb23c6e7a.

Reason for revert: Caused compile failure on Linux ChromiumOS Full

https://cr-buildbucket.appspot.com/build/8842497571648647568 


Original change's description:
> Remove some unnecessary #includes.
>
> According to
> https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html
> these were responsible for 1,460,113,428 bytes of input to the compiler,
> or roughly 0.58% of the input used to build Chrome.
>
> Bug: 242216
> Change-Id: Ib414b36b51fcd1ca153357765c308d02fbfd2b35
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999068
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Jeremy Roman <jbroman@chromium.org>
> Reviewed-by: Wei Li <weili@chromium.org>
> Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
> Reviewed-by: Ken Rockot <rockot@google.com>
> Owners-Override: danakj <danakj@chromium.org>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#898724}

Bug: 242216
Change-Id: I8701f44fa599346967867e8effb09402bdd87621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3007373
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Owners-Override: Tsuyoshi Horo <horo@chromium.org>
Auto-Submit: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898725}
2021-07-06 01:33:12 +00:00
Peter Kasting
aeb23c6e7a Remove some unnecessary #includes.
According to
https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html
these were responsible for 1,460,113,428 bytes of input to the compiler,
or roughly 0.58% of the input used to build Chrome.

Bug: 242216
Change-Id: Ib414b36b51fcd1ca153357765c308d02fbfd2b35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2999068
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Wei Li <weili@chromium.org>
Reviewed-by: Etienne Bergeron <etienneb@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Owners-Override: danakj <danakj@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#898724}
2021-07-06 01:16:12 +00:00
Will Harris
1967f84428 Disable the network service sandbox if SSP/AP DLLs are installed.
Third party DLLs will not load successfully in the sandbox, so for
now just disable the sandbox if they can be detected. Going forward,
there will be more services/extension points that might cause
the sandbox to be disabled.

This adds UMA metrics for SSP/AP status, as well as removing
some unneeded CONTENT_EXPORT from a header file.

BUG=991265

Change-Id: Idcaf6fe20448affc2fd2cf0e4606c8fe5ef4bf30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2674523
Commit-Queue: Will Harris <wfh@chromium.org>
Auto-Submit: Will Harris <wfh@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851263}
2021-02-05 20:34:22 +00:00
Peter Kasting
7ba9440cee Convert CallbackList::Subscription to a standalone class.
Bug: 1103086
AX-Relnotes: n/a.
TBR: pinkerton
Change-Id: I3b241eb7234727f314dd85d1bdbb3a41ceca5938
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522860
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830015}
2020-11-22 01:49:02 +00:00
Clark DuVall
aa68215f41 Remove DumpWithoutCrashing used for debugging NS OOP on Android
We should have enough data from this already, so no need to keep it
around.

Bug: 934317, 1033917
Change-Id: Ib3102b7382e47a5e2f4640090c8bfef69d27d6b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976823
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727215}
2019-12-23 19:46:27 +00:00
Julie Jeongeun Kim
2811b95e9e Convert URLLoaderFactory from //content to new Mojo types
This CL converts URLLoaderFactory from //content
to new Mojo types using PendingRemote and Remote.

Bug: 955171
Change-Id: I106caf8803c9897d6a671042bbc94d3f90a8450a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863933
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#708859}
2019-10-24 00:36:12 +00:00
Julie Jeongeun Kim
a3471c6874 Convert NetworkService to new Mojo types
This CL converts NetworkService from network_service.mojom
to new Mojo types using PendingRemote, PendingReceiver, Remote,
and Receiver.

Bug: 955171
Change-Id: I5ea352f8fd5a62beb92fa96b6fe2ffda3e3aa2df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1847595
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Julie Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#705853}
2019-10-15 07:09:24 +00:00
Ken Rockot
91216c0fb6 Move Network Service off of Service Manager
This switches Network Service to a simpler service model which does not
involve the Service Manager. Instead, the browser directly controls a
singleton Network Service process or in-process instance.

This should not change existing Network Service lifetime or behavior; it
only gives the browser direct control of process lifetime instead of
relying on the Service Manager to do that work.

Bug: 977637
Change-Id: I626ec8bec935e02f7c0d66a3c379a5fc0c547a1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1673442
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705260}
2019-10-11 20:38:11 +00:00
Julie Jeongeun Kim
5984e9922e Convert NetworkContextPtr from CreateNetworkContext() to new Mojo types
It updates CreateNetworkContext() from ContentBrowserClient
and all methods and members which implements it.
The unit tests which use NetworkContextPtr are converted
to mojo::Remote or mojo::PendingRemote.

Bug: 955171, 978694
Change-Id: I0df0f9fec0b70f2704d924c7b52a24127f21c373
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784026
Commit-Queue: Julie Kim <jkim@igalia.com>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695562}
2019-09-11 11:00:46 +00:00
Clark DuVall
afabb7e282 Log events leading up to commit timeout to debug renderer hangs
Bug: 934317
Change-Id: I1060e5d8ae3ab5c4d5decf8ada12cd4b6c424a86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764564
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689752}
2019-08-23 00:41:47 +00:00
Christopher Thompson
2a4c69e9f8 Add metrics for SSLKEYLOGFILE use
We're removing the dangerous flag infobar for this for now in
https://crrev.com/c/1760866. This change adds basic metrics for how
common the use of SSLKeyLogger is.

Bug: 991290
Change-Id: I74e932eef872c59f5b4c8b5de055a2197ac93f43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761288
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Christopher Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689025}
2019-08-21 16:29:11 +00:00
Clark DuVall
1f94e9f455 Log network service ping time on navigation commit timeouts
This will be useful in telling if the network service is responding or
not when a commit timeout happens.

Bug: 934317
Change-Id: I6ea88147bb2ad4e0d393aa8354004b7bdc53fd77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761340
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688864}
2019-08-21 04:09:36 +00:00
Clark DuVall
b026e58650 Record UMAs on navigation commit timeout
This should help debug the Clank renderer hangs with network service.

Bug: 934317
Change-Id: I78f69d5fafd05e4b8984601bc652b1d086d0ca49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726911
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682873}
2019-07-31 19:50:38 +00:00
John Abd-El-Malek
984dc00b95 Fix network service setup/teardown code in unit tests.
There are three fixes:
1) The main fix is that network::NetworkService needs to be torn down between tests. One reason is that so a test don't leave it misconfigured for other tests. The pressing reason is that if network::NetworkService is bound to a pipe in one test it'll also be bound to that test's BrowserThreadTestBundle's sequence; that means for other tests no mojo messages will be dispatched. Fix this by resetting the interface pointer at the end of each test.

2) We need to delete the network::NetworkService object to avoid leaks; depending on connection error dispatching again might not be delivered. This is fixed by storing the pointer in SequenceLocalStorageSlot.

3) We create network::NetworkService directly instead of trying to use the global ServiceManager. For most tests this happens because there's no global Connector. However some tests would instantiate a test service manager objects, so we need to force the direct instantiation through a test only method.

Bug: 966633
Change-Id: I1c181733af692e7a6742a45c10a16c863e2642a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632494
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#664068}
2019-05-29 01:26:59 +00:00