Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1180)

Unified Diff: content/browser/site_instance_impl.h

Issue 2803673006: PlzNavigate: ensure we don't create extra-processes for ServiceWorkers (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..ca3920802e6eef8bec3c1a3623d459d604c48dd0 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -38,6 +38,9 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
static scoped_refptr<SiteInstanceImpl> CreateForURL(
BrowserContext* browser_context,
const GURL& url);
+ static scoped_refptr<SiteInstanceImpl> FindOrCreateForURL(
+ BrowserContext* browser_context,
+ const GURL& url);
// SiteInstance interface overrides.
int32_t GetId() override;
@@ -64,6 +67,8 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
void SetSite(const GURL& url);
bool HasSite() const;
+ void UsedFor(const GURL& url);
+
// Returns whether there is currently a related SiteInstance (registered with
// BrowsingInstance) for the site of the given url. If so, we should try to
// avoid dedicating an unused SiteInstance to it (e.g., in a new tab).
@@ -185,6 +190,8 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
// be true.
bool is_default_subframe_site_instance_;
+ std::set<std::string> sites_displayed_;
+
base::ObserverList<Observer, true> observers_;
DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl);
« no previous file with comments | « content/browser/service_worker/service_worker_process_manager.cc ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698