Remove RenderprocessHost param from ShouldLockToOrigin.

This param was only being used to check for --single-process mode,
which can be done via a static function on RenderProcessHost instead.
This CL will simplify some of the plumbing in a later CL for locking
hosted apps to an origin (https://crrev.com/c/959346).

Bug: 791796
Change-Id: I0ef1e8f3a4a00f80e74f1109a092b795f3c63722
Reviewed-on: https://chromium-review.googlesource.com/1176216
Reviewed-by: Ɓukasz Anforowicz <[email protected]>
Commit-Queue: Alex Moshchuk <[email protected]>
Cr-Commit-Position: refs/heads/master@{#583376}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 4385285..1ae8fc8e 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -540,11 +540,10 @@
 
 // static
 bool SiteInstanceImpl::ShouldLockToOrigin(BrowserContext* browser_context,
-                                          RenderProcessHost* host,
                                           GURL site_url) {
   // Don't lock to origin in --single-process mode, since this mode puts
   // cross-site pages into the same process.
-  if (host->run_renderer_in_process())
+  if (RenderProcessHost::run_renderer_in_process())
     return false;
 
   if (!DoesSiteRequireDedicatedProcess(browser_context, site_url))
@@ -607,7 +606,7 @@
   ChildProcessSecurityPolicyImpl* policy =
       ChildProcessSecurityPolicyImpl::GetInstance();
   auto lock_state = policy->CheckOriginLock(process_->GetID(), site_);
-  if (ShouldLockToOrigin(GetBrowserContext(), process_, site_)) {
+  if (ShouldLockToOrigin(GetBrowserContext(), site_)) {
     // Sanity check that this won't try to assign an origin lock to a <webview>
     // process, which can't be locked.
     CHECK(!process_->IsForGuestsOnly());