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

Unified Diff: content/browser/webui/url_data_manager_backend.cc

Issue 183803023: clean up partition check in url_data_manager_backend.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 9 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698