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

Unified Diff: extensions/common/manifest_handlers/shared_module_info.h

Issue 263703002: Allow shared modules to whitelist extensions that import them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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: extensions/common/manifest_handlers/shared_module_info.h
diff --git a/extensions/common/manifest_handlers/shared_module_info.h b/extensions/common/manifest_handlers/shared_module_info.h
index 4240ed7a81778e24e7e31718627d691158facb91..1724f55a349860a1ca32512929952f9a183eef6e 100644
--- a/extensions/common/manifest_handlers/shared_module_info.h
+++ b/extensions/common/manifest_handlers/shared_module_info.h
@@ -36,6 +36,8 @@ class SharedModuleInfo : public Extension::ManifestData {
static bool IsSharedModule(const Extension* extension);
static bool IsExportAllowed(const Extension* extension,
const std::string& relative_path);
+ static bool IsExportAllowedByWhitelist(const Extension* extension,
+ const std::string& other_id);
asargent_no_longer_on_chrome 2014/05/01 17:50:15 Can you add a comment here mentioning that in the
elijahtaylor1 2014/05/02 00:06:06 Done.
// Functions relating to importing resources.
static bool ImportsExtensionById(const Extension* extension,
@@ -47,6 +49,10 @@ class SharedModuleInfo : public Extension::ManifestData {
// This extension exports the following resources to other extensions.
URLPatternSet exported_set_;
+ // Optional list of extensions from which importing is allowed. If no
+ // whitelist is specified, all extensions can import this extension.
asargent_no_longer_on_chrome 2014/05/01 17:50:15 Oh, ok, I guess you say that right here. Maybe jus
elijahtaylor1 2014/05/02 00:06:06 Done.
+ std::set<std::string> export_whitelist_;
+
// Optional list of module imports of other extensions.
std::vector<ImportInfo> imports_;
};

Powered by Google App Engine
This is Rietveld 408576698