0
Files
src/extensions
Kevin McNee 029c081de6 Bulk rewrite of NavigationHandle::IsInMainFrame callers to IsInPrimaryMainFrame in extensions/
With MPArch (Multiple Page Architecture), we are introducing the ability
for a single WebContents to have multiple pages and therefore multiple
main frames. Based on an audit of existing uses of IsInMainFrame, we
expect most callers are only interested in the "primary" main frame.
Accordingly, we perform a bulk rewrite of IsInMainFrame calls to
IsInPrimaryMainFrame in order to preserve the existing semantics.

The methodology is as follows:
Run the following script:
find extensions/ -type f \( -name "*.cc" -o -name "*.h" -o -name "*.mm" \) -a \! \( -name "*unittest.cc" -o -name "*browsertest.cc" \) -exec sed --in-place --file IsInMainFrame-rewrite-script {} \;
where IsInMainFrame-rewrite-script contains:
/[Ii]sInMainFrame(/ i\
\/\/ TODO(https:\/\/crbug.com\/1218946): Comment goes here.
s/\([Ii]\)sInMainFrame(/\1sInPrimaryMainFrame(/g

Patchset 1 contains the result of the purely mechanical part of this
change. Patchset 2 reverts changes to navigation throttles which are
not part of this rewrite. Patchset 3 reverts conversions that are
noticeably incorrect.

Bug: 1218946
Change-Id: I53fb7011a02b80f00bcef65396559ac20b0d075e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2995069
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#902501}
2021-07-16 17:25:19 +00:00
..

This will become a reusable extensions module. It implements the core parts of Chrome's extension system, and can be used with any host of the content module.

Some extensions code that is not Chrome-specific still lives in //chrome/browser/extensions and will be moved here.

Technical Documentation: