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

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

Issue 10828067: Extension resources should only load in contexts the extension has permission to access. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Line endings. How I hate them. Created 8 years, 5 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: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 990271e17965fb76156cfce707cc728c617aec50..18155b951f14e90442a1f8db570ff9cecd19b134 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -535,10 +535,27 @@ bool Extension::HasWebAccessibleResources() const {
return false;
}
+bool Extension::HasNaClModules() const {
+ if (nacl_modules_.size())
+ return true;
+
+ return false;
+}
+
bool Extension::IsSandboxedPage(const std::string& relative_path) const {
return ResourceMatches(sandboxed_pages_, relative_path);
}
+bool Extension::IsResourceNaClManifest(const std::string& resource) const {
+ GURL url = extension_url_.Resolve(resource);
+ for (std::vector<NaClModuleInfo>::const_iterator it = nacl_modules_.begin();
+ it != nacl_modules_.end(); it++) {
+ if (it->url == url)
+ return true;
+ }
+ return false;
+}
+
std::string Extension::GetResourceContentSecurityPolicy(
const std::string& relative_path) const {
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/renderer/extensions/extension_resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698