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 22f275e55a23417d4da5613e15b87b780e6efd11..2df85046bb70dd28bb3ec4521de1483a8e4ad2dd 100644 |
--- a/content/browser/webui/url_data_manager_backend.cc |
+++ b/content/browser/webui/url_data_manager_backend.cc |
@@ -356,17 +356,11 @@ 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 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; |
jam
2014/03/05 22:29:46
i.e. do hosts->push_back(kChromeUIResourcesHost) h
|
+ GetContentClient()->browser()->GetWebUIHostsToIgnoreParititionCheck(&hosts); |
if (url.SchemeIs(kChromeUIScheme) && |
- (url.host() == kChromeUIResourcesHost || |
- url.host() == "favicon" || |
- url.host() == "theme" || |
- url.host() == "thumb" || |
- url.host() == "thumb2" || |
- url.host() == "thumbnails")) { |
+ (std::find(hosts.begin(), hosts.end(), url.host()) != hosts.end())) { |
allowed = true; |
} else { |
RenderProcessHost* process = RenderProcessHost::FromID(render_process_id); |