Index: content/browser/webui/url_data_manager_backend.cc |
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc |
index 8d0ab0a2f3c252f1d2f406c9bd5a44f882440386..ef42446e655e09b2c9fcdc2dc40bea9337e7a1c7 100644 |
--- a/content/browser/webui/url_data_manager_backend.cc |
+++ b/content/browser/webui/url_data_manager_backend.cc |
@@ -356,18 +356,13 @@ void URLRequestChromeJob::CheckStoragePartitionMatches( |
// being in the same process. We do an extra check to guard against an |
// exploited renderer pretending to add them as a subframe. We skip this check |
// for resources. |
- // TODO(guohui): move URL constants for extension-icon, favicon, theme, thumb, |
- // thumb and thumbnails from chrome/common/url_constants.h to |
- // content/public/common/url_constants.h, so that they could be reused here. |
bool allowed = false; |
+ std::vector<std::string> hosts; |
+ GetContentClient()-> |
+ browser()->GetAdditionalWebUIHostsToIgnoreParititionCheck(&hosts); |
if (url.SchemeIs(kChromeUIScheme) && |
- (url.host() == kChromeUIResourcesHost || |
Dan Beam
2016/05/17 03:43:48
it seems as if this host got dropped during this r
|
- url.host() == "extension-icon" || |
- url.host() == "favicon" || |
- url.host() == "theme" || |
- url.host() == "thumb" || |
- url.host() == "thumb2" || |
- url.host() == "thumbnails")) { |
+ (url.SchemeIs(kChromeUIScheme) || |
+ std::find(hosts.begin(), hosts.end(), url.host()) != hosts.end())) { |
Dan Beam
2016/05/17 02:28:55
did this code ever work? it seems like any chrome
Charlie Reis
2016/05/17 21:08:24
Yeah, this doesn't match the change that jam@ requ
|
allowed = true; |
} else { |
RenderProcessHost* process = RenderProcessHost::FromID(render_process_id); |