Index: content/browser/site_instance_impl.h |
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h |
index 001790fcb376970e72470c98ab8ec1ce527d7de3..8f67579afb1082504795c5476ef6602ac9b4b8b5 100644 |
--- a/content/browser/site_instance_impl.h |
+++ b/content/browser/site_instance_impl.h |
@@ -149,6 +149,14 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance, |
static bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context, |
const GURL& url); |
+ // Returns true unless a process for |site_url| cannot be locked to just that |
Charlie Reis
2017/06/17 23:13:53
nit: s/unless/if/, s/cannot/should/
(Otherwise it'
alexmos
2017/06/19 20:03:59
Done.
|
+ // site. Returning true here implies that |site_url| requires a dedicated |
Charlie Reis
2017/06/17 23:13:53
nit: also implies
alexmos
2017/06/19 20:03:59
Done.
|
+ // process. However, the converse does not hold: if |site_url| requires a |
Charlie Reis
2017/06/17 23:13:53
I'm finding this pretty hard to read, since "lock
alexmos
2017/06/19 20:03:59
Done, and also see below.
|
+ // dedicated process, this might still return false for certain special |
+ // cases, most of which are temporary bug workarounds. |
Charlie Reis
2017/06/17 23:13:53
"Temporary bug workarounds" is confusing me a bit.
alexmos
2017/06/19 20:03:59
I was mostly thinking about this comment on Conten
Charlie Reis
2017/06/28 00:08:37
Huh. How would we apply origin lock to all URLs?
alexmos
2017/06/28 00:33:26
I assumed this just meant "origin lock can be appl
|
+ static bool ShouldLockToOrigin(BrowserContext* browser_context, |
+ GURL site_url); |
+ |
private: |
friend class BrowsingInstance; |
friend class SiteInstanceTestBrowserClient; |
@@ -167,7 +175,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance, |
int exit_code) override; |
// Used to restrict a process' origin access rights. |
- void LockToOrigin(); |
+ void LockToOriginIfNeeded(); |
// This gets the render process to use for default subframe site instances. |
RenderProcessHost* GetDefaultSubframeProcessHost( |