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

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

Issue 2921063003: Fix process reuse for dedicated processes when over process limit. (Closed)
Patch Set: Cleanup 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 97595f18ea206f1836685b20686f878185384eeb..03c9bb026e68c4f6c6c1143a7bf75452ecbf8425 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -352,6 +352,13 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
virtual void SetIsNeverSuitableForReuse() = 0;
virtual bool MayReuseHost() = 0;
+ // Indicates whether this RenderProcessHost can be used to host a URL that
+ // requires a dedicated process. This starts out as true for new processes
+ // and will become false after a call to UnsetCanBecomeDedicatedProcess(),
+ // such as after the process has been used to host web content.
+ virtual bool CanBecomeDedicatedProcess() = 0;
alexmos 2017/06/12 17:35:07 These are public because of MockRenderProcessHost.
Charlie Reis 2017/06/12 23:08:17 Sigh. Some day we'll fix that.
Charlie Reis 2017/06/12 23:08:17 Yeah, I wonder if there's a better concept to be t
alexmos 2017/06/14 22:39:05 I like this, especially given the potential for th
Charlie Reis 2017/06/17 23:13:53 Yes, saying it's implicit in those cases might be
alexmos 2017/06/19 20:03:58 Done.
+ virtual void UnsetCanBecomeDedicatedProcess() = 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