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

Unified Diff: content/public/browser/render_process_host.h

Issue 2921063003: Fix process reuse for dedicated processes when over process limit. (Closed)
Patch Set: Fix IsSuitableHost for sites that require a dedicated process but don't set an origin lock Created 3 years, 6 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/public/browser/render_process_host.h
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index 778f93da8ceffbb9c6fa48d053c098f332289d64..81f6a2f9ac4953d23106e6d142921e9fea68f9cb 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -364,6 +364,16 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
virtual void SetIsNeverSuitableForReuse() = 0;
virtual bool MayReuseHost() = 0;
+ // Indicates whether this RenderProcessHost is "unused". This starts out as
+ // true for new processes and becomes false after one of the following:
+ // (1) This process commits any page.
+ // (2) This process is given to a SiteInstance that already has a site
+ // assigned.
+ // Note that while a process is unused, it is still suitable to host a URL
+ // that requires a dedicated process.
+ virtual bool IsUnused() = 0;
+ virtual void SetIsUsed() = 0;
+
// Returns the current number of active views in this process. Excludes
// any RenderViewHosts that are swapped out.
size_t GetActiveViewCount();

Powered by Google App Engine
This is Rietveld 408576698