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

Unified Diff: content/public/test/mock_render_process_host.cc

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/test/mock_render_process_host.cc
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
index 41980374ca2a43e2ab0555f3c5fa73f03ea3e0ce..c416d155736a77f64573e24a229f5d102ad9abee 100644
--- a/content/public/test/mock_render_process_host.cc
+++ b/content/public/test/mock_render_process_host.cc
@@ -46,6 +46,7 @@ MockRenderProcessHost::MockRenderProcessHost(BrowserContext* browser_context)
deletion_callback_called_(false),
is_for_guests_only_(false),
is_process_backgrounded_(false),
+ is_unused_(true),
worker_ref_count_(0),
weak_ptr_factory_(this) {
// Child process security operations can't be unit tested unless we add
@@ -358,6 +359,14 @@ bool MockRenderProcessHost::MayReuseHost() {
return true;
}
+bool MockRenderProcessHost::IsUnused() {
+ return is_unused_;
+}
+
+void MockRenderProcessHost::SetIsUsed() {
+ is_unused_ = false;
+}
+
void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
}
« content/browser/site_instance_impl.cc ('K') | « content/public/test/mock_render_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698