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

Unified Diff: chrome/common/extensions/csp_handler.cc

Issue 12886023: Remove SandboxedPages and SandboxedCSP from Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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/common/extensions/csp_handler.h ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/csp_handler.cc
diff --git a/chrome/common/extensions/csp_handler.cc b/chrome/common/extensions/csp_handler.cc
index 1ed5832a1577e10ab89239f00e2a54e612924c0d..978a86d20c69f21e3d17644d404543b88a730b1f 100644
--- a/chrome/common/extensions/csp_handler.cc
+++ b/chrome/common/extensions/csp_handler.cc
@@ -10,6 +10,7 @@
#include "base/values.h"
#include "chrome/common/extensions/csp_validator.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h"
namespace keys = extension_manifest_keys;
namespace errors = extension_manifest_errors;
@@ -60,6 +61,15 @@ const std::string& CSPInfo::GetContentSecurityPolicy(
return csp_info ? csp_info->content_security_policy : EmptyString();
}
+// static
+const std::string& CSPInfo::GetResourceContentSecurityPolicy(
+ const Extension* extension,
+ const std::string& relative_path) {
+ return SandboxedPageInfo::IsSandboxedPage(extension, relative_path) ?
+ SandboxedPageInfo::GetContentSecurityPolicy(extension) :
+ GetContentSecurityPolicy(extension);
+}
+
CSPHandler::CSPHandler(bool is_platform_app)
: is_platform_app_(is_platform_app) {
}
« no previous file with comments | « chrome/common/extensions/csp_handler.h ('k') | chrome/common/extensions/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698