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

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

Issue 2921063003: Fix process reuse for dedicated processes when over process limit. (Closed)
Patch Set: Rebase 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..e42a39f90b0f3e85207d0980fede072036d300d8 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -364,6 +364,20 @@ 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 a process hosting ServiceWorkers will be implicitly handled by
+ // (2) during ServiceWorker initialization, and SharedWorkers will be handled
+ // by (1) since a page needs to commit before it can create a SharedWorker.
+ //
+ // 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();
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/public/test/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698