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

Unified Diff: chrome/renderer/extensions/resource_request_policy.cc

Issue 11821009: move 'web_accessible_resources' parsing out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: patch rebased Created 7 years, 11 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/renderer/chrome_content_renderer_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/resource_request_policy.cc
diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc
index e38158d2bc4ef60d67c345363c52cc62b54c1887..194ae25e1fe06b93b1cb824c70cbaee338fc8eeb 100644
--- a/chrome/renderer/extensions/resource_request_policy.cc
+++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -11,6 +11,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest_url_handler.h"
+#include "chrome/common/extensions/web_accessible_resources_handler.h"
#include "chrome/common/url_constants.h"
#include "content/public/common/page_transition_types.h"
#include "extensions/common/constants.h"
@@ -51,9 +52,10 @@ bool ResourceRequestPolicy::CanRequestResource(
return false;
}
- // Disallow loading of extension resources which are not explicitely listed
+ // Disallow loading of extension resources which are not explicitly listed
// as web accessible if the manifest version is 2 or greater.
- if (!extension->IsResourceWebAccessible(resource_url.path()) &&
+ if (!WebAccessibleResourcesInfo::IsResourceWebAccessible(
+ extension, resource_url.path()) &&
!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableExtensionsResourceWhitelist)) {
GURL frame_url = frame->document().url();
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698