New issue
Advanced search Search tips

Issue 847961 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug
Proj-Servicification



Sign in to add a comment

Enhance configuration of network-service owned netlog so it provides standard functionality all embedders need.

Project Member Reported by mef@chromium.org, May 30 2018

Issue description

We have a bunch of things like this, in various embedders:
https://cs.chromium.org/chromium/src/content/shell/browser/shell_net_log.cc
https://cs.chromium.org/chromium/src/headless/lib/browser/headless_net_log.cc
which basically differ only in the stuff they stuff inside the thing in
GetConstants.
(Chrome proper's version is more complicated, but it has all this stuff,
too).

Now, long term the NetLog should be owned by the Network Service (it's only
kinda doing this sometimes now, but fixing that is messy),
and so it would be nice if in the network service world there was a
shared way of getting the functionality those classes provide,
in particular --log-net-log and sticking in of some customized constants
into thelog preamble.

The network service process cannot do this alone, however, since it will be
sandboxed, and will therefore be unable to open an arbitrary
file requested by user --- so the setup code in browser process in content/
will need to open the file if the flag is there, ask the embedder for
constants it wants (maybe via a method on ContentBrowserClient, perhaps
with API similar to GetPlatformConstants here:

https://chromium-review.googlesource.com/c/chromium/src/+/1016669/35/components/net_log/chrome_net_log.cc#71),

and pass it over to the network service over a mojo call, which will do
something that will probably replace this:
https://cs.chromium.org/chromium/src/services/network/mojo_net_log.cc?rcl=e65d6b85e45f22eae7b664457b645d291a7743de&l=24
(using CreateUnboundedPreExisting instead of CreateUnbounded).
 

Comment 1 by dxie@google.com, Jun 7 2018

Labels: Hotlist-KnownIssue OS-Chrome OS-Linux OS-Mac OS-Windows

Comment 2 by mef@chromium.org, Jun 7 2018

Owner: lilyhoughton@chromium.org
Status: Assigned (was: Untriaged)
Cc: morlovich@chromium.org
Components: Internals>Network>Logging
Owner: mmenke@chromium.org
The CL https://chromium-review.googlesource.com/c/chromium/src/+/1147463 is almost ready to land. 

Moving to Matt to finish it up.
Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38662e2f560f921c48e642c2a06975cc2e39623d

commit 38662e2f560f921c48e642c2a06975cc2e39623d
Author: Matt Menke <mmenke@chromium.org>
Date: Tue Aug 07 12:18:11 2018

Enhance configuration of the NetworkService-owned NetLog

This CL moves code related to opening files out of the NetworkService
(which will eventually be sandboxed), as well as factoring out some of
the shared features of the NetLog subclasses, to make code deduplication
easier.

Implementations are provided for ChromeContentClient and
ShellContentClient classes.

Bug: 847961
Change-Id: I0a332b4429a2f20cbb38ae1671b8df0fbee28ba1
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1161470
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581201}
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/chrome/common/BUILD.gn
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/chrome/common/DEPS
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/chrome/common/chrome_content_client.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/chrome/common/chrome_content_client.h
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/content/browser/network_service_instance.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/content/public/common/content_client.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/content/public/common/content_client.h
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/content/shell/common/shell_content_client.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/content/shell/common/shell_content_client.h
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/mojo_net_log.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/mojo_net_log.h
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/network_service.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/network_service.h
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/network_service_unittest.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/network/public/mojom/network_service.mojom
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/service_manager/public/cpp/service_test.cc
[modify] https://crrev.com/38662e2f560f921c48e642c2a06975cc2e39623d/services/service_manager/public/cpp/service_test.h

Cc: mmenke@chromium.org
Owner: ----
Status: Available (was: Started)
Marking this as available - may pick this up later, not sure.
Labels: Enterprise-Triaged

Sign in to add a comment