| Index: content/browser/webui/web_ui_impl.cc
 | 
| diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui_impl.cc
 | 
| index 41fc037852c786645705881beed7ad9ca6d0e0fa..9f5c70c3a6d658132d210349f820fa31f1ac6de5 100644
 | 
| --- a/content/browser/webui/web_ui_impl.cc
 | 
| +++ b/content/browser/webui/web_ui_impl.cc
 | 
| @@ -17,6 +17,7 @@
 | 
|  #include "content/browser/web_contents/web_contents_view.h"
 | 
|  #include "content/browser/webui/web_ui_controller_factory_registry.h"
 | 
|  #include "content/common/view_messages.h"
 | 
| +#include "content/public/browser/browser_context.h"
 | 
|  #include "content/public/browser/content_browser_client.h"
 | 
|  #include "content/public/browser/render_frame_host.h"
 | 
|  #include "content/public/browser/render_view_host.h"
 | 
| @@ -24,6 +25,7 @@
 | 
|  #include "content/public/browser/web_ui_message_handler.h"
 | 
|  #include "content/public/common/bindings_policy.h"
 | 
|  #include "content/public/common/content_client.h"
 | 
| +#include "content/public/common/url_constants.h"
 | 
|  
 | 
|  namespace content {
 | 
|  
 | 
| @@ -46,6 +48,29 @@ base::string16 WebUI::GetJavascriptCall(
 | 
|        base::char16('(') + parameters + base::char16(')') + base::char16(';');
 | 
|  }
 | 
|  
 | 
| +// static
 | 
| +bool WebUIImpl::RenderProcessAllowedForURL(RenderProcessHost* process,
 | 
| +                                           const GURL& url) {
 | 
| +  bool is_web_ui_scheme =
 | 
| +      url.SchemeIs(kChromeDevToolsScheme) || url.SchemeIs(kChromeUIScheme);
 | 
| +  std::vector<std::string> additional_schemes;
 | 
| +  GetContentClient()->browser()->GetAdditionalWebUISchemes(&additional_schemes);
 | 
| +  if (std::find(additional_schemes.begin(), additional_schemes.end(),
 | 
| +                url.scheme()) != additional_schemes.end()) {
 | 
| +    is_web_ui_scheme = true;
 | 
| +  }
 | 
| +
 | 
| +  if (!is_web_ui_scheme)
 | 
| +    return true;
 | 
| +
 | 
| +  if (!process)
 | 
| +    return false;
 | 
| +
 | 
| +  StoragePartition* partition = BrowserContext::GetStoragePartitionForSite(
 | 
| +      process->GetBrowserContext(), url);
 | 
| +  return partition == process->GetStoragePartition();
 | 
| +}
 | 
| +
 | 
|  WebUIImpl::WebUIImpl(WebContents* contents, const std::string& frame_name)
 | 
|      : link_transition_type_(ui::PAGE_TRANSITION_LINK),
 | 
|        bindings_(BINDINGS_POLICY_WEB_UI),
 | 
| 
 |