| Index: content/browser/site_instance_impl.h
|
| diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
|
| index fc2ad85bd30738cf2167cc2bd8735aeebe7ced99..99d7b645f16b0ac160efac671643a98f20b421ee 100644
|
| --- a/content/browser/site_instance_impl.h
|
| +++ b/content/browser/site_instance_impl.h
|
| @@ -124,9 +124,25 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
| static bool DoesSiteRequireDedicatedProcess(BrowserContext* browser_context,
|
| const GURL& url);
|
|
|
| + // Add an origin to the list of origins that require process isolation.
|
| + // When making process model decisions for such origins, the full
|
| + // scheme+host+port tuple rather than eTLD+1 will be used. SiteInstances for
|
| + // these origins will also use the full origin as site URL.
|
| + static void AddIsolatedOrigin(const url::Origin& origin);
|
| +
|
| + // Register a set of isolated origins as specified on the command line with
|
| + // the --isolate-origins flag. |origin_list| is the flag's value, which
|
| + // contains the list of comma-separated scheme-host-port origins. See
|
| + // AddIsolatedOrigin for definition of an isolated origin.
|
| + static void AddIsolatedOriginsFromCommandLine(const std::string& origin_list);
|
| +
|
| + // Helper to check whether an origin requires origin-wide process isolation.
|
| + static bool IsIsolatedOrigin(const url::Origin& origin);
|
| +
|
| private:
|
| friend class BrowsingInstance;
|
| friend class SiteInstanceTestBrowserClient;
|
| + FRIEND_TEST_ALL_PREFIXES(SiteInstanceTest, IsolateOriginsFromCommandLine);
|
|
|
| // Create a new SiteInstance. Only BrowsingInstance should call this
|
| // directly; clients should use Create() or GetRelatedSiteInstance() instead.
|
| @@ -153,6 +169,12 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
| is_default_subframe_site_instance_ = true;
|
| }
|
|
|
| + // Tracks origins for which the entire origin should be treated as a site
|
| + // when making process model decisions, rather than the origin's eTLD+1. Each
|
| + // of these origins requires a dedicated process.
|
| + using IsolatedOriginSet = std::set<url::Origin>;
|
| + static IsolatedOriginSet* GetIsolatedOrigins();
|
| +
|
| // An object used to construct RenderProcessHosts.
|
| static const RenderProcessHostFactory* g_render_process_host_factory_;
|
|
|
|
|