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

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: Created 6 years, 10 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
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);

Powered by Google App Engine
This is Rietveld 408576698