0
Commit Graph

3 Commits

Author SHA1 Message Date
Sharon Yang
2c077a71d5 Add ProcessLock::FromSiteInfo, remove SiteInstanceImpl::GetProcessLock
ProcessLocks are used to represent what level of isolation a given
SiteInfo principal requires (e.g., whether it needs a dedicated process
for its site or origin), as well as what sites or origins are allowed
into a given process.

Both SiteInstance and SiteInstanceGroup simply use their SiteInfo to
represent the required lock, and do not need dedicated APIs for it.
Instead, callers should use ProcessLock::FromSiteInfo to do ProcessLock
comparisons. A ProcessLock constructor that takes a SiteInfo exists,
but has been made private in favour of using the static function.

Internal doc with more background
https://docs.google.com/document/d/19H19czBu8_FjOT8Cy8KdEVXxN-gZ93uNVM5rx1Qu9kw/edit?usp=sharing&resourcekey=0-bf4Im7qJWJDYnImt6OsAzw .

Test: CQ (no behaviour change)
Bug: 1261963
Change-Id: Idd0aefea850a795450b62bfc5dcff0b770739e5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3284127
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946273}
2021-11-30 02:27:58 +00:00
Sharon Yang
a69425513c Move ProcessLock functions from .h to .cc
There are some functions that are declared and defined in process_lock.h
that are more than simple getters or setters. Rename them accordingly
and move the definitions to process_lock.cc

Test: CQ (no behaviour change)
Change-Id: Ic600842d78a1d8a92b3538aa00db9dd5fabde113
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276361
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942284}
2021-11-16 21:15:09 +00:00
Sharon Yang
a005ca1217 Move ProcessLock to a separate file
ProcessLock is a large enough class that it should be in its own file.

Test: CQ (no functionality changed)
Change-Id: Id706fc5c4fc1b5ba4835507519df7db3bb6cd1a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3271768
Commit-Queue: Sharon Yang <yangsharon@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#942265}
2021-11-16 20:09:42 +00:00