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

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

Issue 10458063: Add sanbdoxed_pages to allow extension/app pages to be served in a sandboxed, unique origin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 11915a7ed8cddc22ef28465c66363396d1c51e86..aa3625b247e9bd488277b3a8f61c383e7e7ea1b6 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -333,6 +333,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Returns true when 'web_accessible_resources' are defined for the extension.
bool HasWebAccessibleResources() const;
+ // Returns true if the specified resource should be served in a sandboxed
+ // unique origin.
+ bool IsResourceSandboxed(const std::string& relative_path) const;
+
// Returns an extension resource object. |relative_path| should be UTF8
// encoded.
ExtensionResource GetResource(const std::string& relative_path) const;
@@ -739,6 +743,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool LoadPlugins(string16* error);
bool LoadNaClModules(string16* error);
bool LoadWebAccessibleResources(string16* error);
+ bool LoadSandboxedResources(string16* error);
bool CheckRequirements(string16* error);
bool LoadDefaultLocale(string16* error);
bool LoadOfflineEnabled(string16* error);
@@ -947,6 +952,10 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Optional list of web accessible extension resources.
base::hash_set<std::string> web_accessible_resources_;
+ // Optional list of web extension resources that are sandboxed (served from
+ // a unique origin).
+ base::hash_set<std::string> sandboxed_resources_;
+
// Optional URL to a master page of which a single instance should be always
// loaded in the background.
GURL background_url_;

Powered by Google App Engine
This is Rietveld 408576698