0
Commit Graph

24 Commits

Author SHA1 Message Date
Samuel Huang
d0b0e064c1 [DevUI DFM] Move 6 chrome:// pages to DFM, via new dev_ui_content_resources.pak.
This CL moves 29.0 kB of "long tail" resources to the Developer WebUI
Dynamic Feature Module (DevUI DFM), for 6 chrome://pages whose
resources were in content_resources.pak. The pages moved are:

  appcache-internals (IDR_APPCACHE_INTERNALS_*)
  gpu (IDR_GPU_INTERNALS_*)
  indexeddb-internals (IDR_INDEXED_DB_INTERNALS_*)
  network-errors (IDR_NETWORK_ERROR_LISTING_*)
  process-internals (IDR_PROCESS_INTERNALS_*)
  serviceworker-internals (IDR_SERVICE_WORKER_INTERNALS_*)

For chrome://gpu, IDR_VULKAN_* remain in content_resources.pak (and the
base module) since they're aliased in shared_resources_data_source.cc.

Also rename target //content:resources to //content:content_resources
to improve naming consistency.

Bug: 927131
Change-Id: Icbc159637e5986438a05de918443ec1fa40d2dce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1992012
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733258}
2020-01-20 06:32:12 +00:00
Nico Weber
374f209d46 Reformat all gn files in /content/browser.
`gn format` recently changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.

Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.

This CL was uploaded by git cl split.

R=boliu@chromium.org

Bug: 1041419
Change-Id: Ied9d082ee57276d5b82983e6b42ee7914dea9eff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1998672
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732255}
2020-01-16 04:03:17 +00:00
Mario Sanchez Prada
5509ddb45e Fix unsafe downcast of WebUIController into ProcessInternalsUI
This CL migrates the code using the unsafe static_cast to using
the new mechanism to downcast to subclasses of WebUIController,
implemented in crrev.com/c/1959199.

Bug: 1006361, 1002647
Change-Id: I72797397f0427450b988897335c43903a96dc80d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1962253
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Cr-Commit-Position: refs/heads/master@{#725455}
2019-12-17 08:49:11 +00:00
Miyoung Shin
b14602b0e5 Convert ProcessInternalsHandler client to use BrowserInterfaceBroker
This CL converts ProcessInternalsHandler mojom interface client
in content to use BrowserInterfaceBroker. ProcessInternalsUI
gotten from WebUI of WebContents is used to register its binder.

Bug: 1006361, 1002647
Change-Id: I77217607682325390d3739824fde5c68b4e411c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1905299
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716512}
2019-11-19 05:25:51 +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
Nasko Oskov
8a73f7d87f Remove WebUI bindings from process-internals WebUI.
This CL is converting the process-internals WebUI to work without
WebUI bindings being granted to its process. It requires adding a
new method to RenderFrameHost and its Mojo interface to the renderer
process to enable JS bindings for Mojo.

Change-Id: Idd9b89cc68b341891d1622a019a93103642ce91d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814688
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700886}
2019-09-27 22:29:32 +00:00
Henrique Ferreiro
8feb71f054 Migrate process_internals.mojom to the new Mojo types
Convert the implementation and all users of the
mojom::ProcessInternalsHandler interface.

Bug: 955171
Change-Id: I61c50a66af2bbf9976baf665f6185eb3e7edb79e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795427
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#697008}
2019-09-17 00:05:48 +00:00
Giovanni Ortuño Urquidi
1da40f47ff mojo: process-internals: Use new bindings names for process internals
Mojo JS Lite Bindings were recently renamed to align with the new C++
names. This CL changes usage of the old names with the new ones. See
bug for more details.

Bug: 968369
Change-Id: Icd7d6dad30afc319cf72a81351704756c3606bf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741587
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685054}
2019-08-08 01:24:20 +00:00
Alex Moshchuk
e7f8938a5e Show isolated origins on chrome://process-internals
This CL adds plumbing to display isolated origins on the
chrome://process-internals debugging page.  They are broken into two
categories: user-triggered (i.e., origins that became isolated because
a user typed a password) and global.  For globally isolated origins,
we also show a source string that describes how they were added.  The
text for showing these origins was taken from engedy@'s suggestion from
the following discussion:
https://docs.google.com/a/google.com/document/d/1cCIKkM8EpmfhTsF8XvVPJ432oQtKbyHZAFNxbiAc-Os/edit?disco=AAAACwlHkWE

Change-Id: Ic8a0cfb9d209299dd24fa4de43746515af97a6c8
Bug: 920911, 850087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703289
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679160}
2019-07-19 17:12:10 +00:00
Giovanni Ortuño Urquidi
301f05c786 mojo: Change default value of use_old_js_bindings_names to false
Add the variable wherever is needed

TBR=calamity@chromium.org,dalecurtis@chromium.org,fdoray@chromium.org,martis@chromium.org,khorimoto@chromium.org,kinuko@chromium.org

Bug: 968369
Change-Id: Id57be1110e021b34badf8acf1f505e50fbd03f71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1694562
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: Michael Martis <martis@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677258}
2019-07-15 07:01:06 +00:00
Alex Moshchuk
c467942ca6 Plumb isolated origin source information.
This CL associates a new "source" field with each isolated origins, to
track how/why each isolated origin was added.  This will be useful for
showing isolated origins on chrome://process-internals, so users can
tell why a certain origin is on that list.  The underlying refactor
here will also be helpful with supporting wildcard origins.

The changes in this CL include:

- Annotate all call sites that add isolated origins with source
  information.

- Replace SiteIsolationPolicy::GetIsolatedOrigins() with a new call
  ApplyGlobalIsolatedOrigins().  Browser startup code no longer needs
  to retrieve all the origins and then apply them via
  ChildProcessSecurityPolicy in a second step; this is now done
  internally by ApplyGlobalIsolatedOrigins(), which also assigns
  proper source information to each class of added isolated origins.

- Add a new function,
  ChildProcessSecurityPolicy::GetIsolatedOrigins(source, profile),
  which can be used to query currently active isolated origins based
  on provided source and/or profile information.  This is only used in
  a test right now, but will be hooked up to
  chrome://process-internals in a followup CL.

Change-Id: I94827176e9e64b8b5be201ccb671a57126ad07bf
Bug: 920911
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1616972
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668020}
2019-06-11 17:04:48 +00:00
dpapad
0d1a182b6f WebUI: Remove WebUIDataSource::UseGzip(), no longer needed.
After r655514, UseGzip() is a no-op and can be removed. WebUI data sources
don't need to do anything special anymore to differentiate between compressed
and non-compressed files, since this is handled at a lower layer already.

Bug: 738243
Change-Id: Icfdccb611cee010a0c9091b276ee8d5796f9ddcd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1563032
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#657795}
2019-05-08 18:56:15 +00:00
W. James MacLean
f79c97e302 Implement strict origin isolation for trial.
This CL does a simple implementation of strict origin isolation to
enable a trial to determine the effects of such a policy on browser
performance.

Bug: 902399
Change-Id: I8c0354338a3292c0476adbe920d85d507859221f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584466
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656163}
2019-05-02 20:35:46 +00:00
Kyle Horimoto
a69ab46787 [CrOS Cellular] Make url.mojom-lite.js a shared resource.
This CL shares url.mojom-lite.js from chrome://resources and updates
relevant clients to refer to the shared resource instead of packaging
the resource individually for each page.

This is in preparation for utilizing url.mojom-lite.js in the cellular
activation dialog.

Bug: 953400
Change-Id: Ifd18cf7598d426fbe3deba87760d5d4f80008ccb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570253
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653032}
2019-04-23 00:08:21 +00:00
Alex Moshchuk
082b5f8dbf Hook up the "isolate password sites" mode to chrome://process-internals
This CL adds the plumbing so that chrome://process-internals can
reflect that we're isolating password sites in the list of isolation
modes.  This follows up on https://crrev.com/c/1507315. In future
followups, the plan is to also display the list of actual sites that
were isolated in this mode.

For testing on Android, enable "Site Isolation For Password Sites" from
chrome://flags, restart, go to chrome://process-internals, and you
should see "Isolate Password Sites" in the list of isolation modes.

Bug: 905513
Change-Id: I981a89eeef44fe245aa4b2e4a3d94dfb07d6da8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521596
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640572}
2019-03-14 01:34:16 +00:00
Reilly Grant
bc13062737 [process_internals] Port to mojo_bindings_lite.js
This change updates chrome://process-internals to use
mojo_bindings_lite.js, which is a smaller version of
mojo_bindings.js.

Bug: 931798
Change-Id: I068b533428fe96181d143f820e33464596f3dc43
Reviewed-on: https://chromium-review.googlesource.com/c/1475683
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633075}
2019-02-18 13:33:38 +00:00
Raul Tambre
13078e3ce9 Fix various 64-bit truncation issues in //content/browser
Bug: 879657
Change-Id: I5b2f815bb22631dcfa9bf66053ad4b3c05b3ba21
Reviewed-on: https://chromium-review.googlesource.com/c/1443118
Commit-Queue: Raul Tambre <raul@tambre.ee>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#627211}
2019-01-29 23:29:22 +00:00
Sebastien Marchand
f8cbfab434 Include base/bind.h in the files that use it (in //content).
Gab, I've used your refactoring script for this, the rule is:
  matches = re.compile(r'(\n *[^/\n][^/\n]*base::Bind(Once|Repeating)?\b[^*])', re.DOTALL).findall(content)

  if not matches:
    return False

  updated_content = refactor_lib.AddInclude(file_path, content, "base/bind.h")

  if updated_content == content:
    return False

  # Write updated file
  refactor_lib.WriteFile(file_path, updated_content)

TBR=gab@chromium.org

Change-Id: I6cca9dff7fa4937fd7accdc57fe774674f6c147b
Reviewed-on: https://chromium-review.googlesource.com/c/1437100
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626088}
2019-01-25 16:02:30 +00:00
Alex Moshchuk
add0a11ab0 Fix origin lock state on chrome://process-internals.
chrome://process-internals calculates and displays each process's
locked state by checking lock_url().  That won't give the correct
result, since lock_url() is computed before we lock the process, and
having it doesn't imply that the process will actually be locked in
the future.  Fix this to check the process's lock in
ChildProcessSecurityPolicy, which should always given the correct
result.

Bug: 850087
Change-Id: Ibf5e37fc69919e6c1e6a7e67943942cf6c93242d
Reviewed-on: https://chromium-review.googlesource.com/c/1287953
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601655}
2018-10-22 18:19:07 +00:00
Nasko Oskov
2498284f74 Add information about all WebContents in a profile to process-internals.
This CL adds basic information for all WebContents in the current
browser profile. For each one, the frame tree is displayed in a
tree UI.

Bug: 850087
Change-Id: I91e88f88ad97931fb708f97e44e12d676648c507
Reviewed-on: https://chromium-review.googlesource.com/c/1265022
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597397}
2018-10-06 02:02:05 +00:00
Nasko Oskov
9e5619a871 Create basic structure with panes for process-internals.
This CL borrows code and layout from chrome://inspect to allow us to have
multiple ways to view internals of the process model. Subsequent CLs
will fill in the actual data on those extra panes.

Bug: 850087
Change-Id: Ia2891804dd61346e86c44c4aca32daf57302aed4
Reviewed-on: https://chromium-review.googlesource.com/c/1255599
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596347}
2018-10-03 20:37:33 +00:00
Lukasz Anforowicz
59aed37640 Remove code related to Top Document Isolation (TDI) feature.
We've decided to not ship this feature and focus on other isolation
modes instead.

Bug: 884842
Change-Id: I5895e12f4c80fa22e9fef8ea7045a1bb6a7913bb
Reviewed-on: https://chromium-review.googlesource.com/1228944
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595635}
2018-10-01 23:32:17 +00:00
Alex Moshchuk
e5f283dc5d Remove the list of isolated origins from chrome://process-internals.
The full list of isolated origins might include sensitive info in
upcoming field trials, so show the number of isolated origins instead
of actual list.

Bug: 872375
Change-Id: I944919cc9ce2afa953bbca77a489c9df62105ab8
Reviewed-on: https://chromium-review.googlesource.com/1167962
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581965}
2018-08-09 23:56:48 +00:00
Nasko Oskov
3e19fbd5dd Add chrome://process-internals WebUI
This CL adds barebones implementation of chrome://process-internals
WebUI, which only shows the current Site Isolation mode and list
of origins isolated by policy or command line.

Bug: 850087
Change-Id: I14b8e20bc763488e8b4ea433599125c96c5ba8d3
Reviewed-on: https://chromium-review.googlesource.com/1091167
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566638}
2018-06-13 00:13:29 +00:00