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

Unified Diff: chrome/browser/extensions/extension_management_test_util.h

Issue 595363002: Add policy controlled permission block list for extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-fix
Patch Set: fixes addressing #4 Created 6 years, 2 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/browser/extensions/extension_management_test_util.h
diff --git a/chrome/browser/extensions/extension_management_test_util.h b/chrome/browser/extensions/extension_management_test_util.h
index 5347f426a82ddd44f8f1aba6a81b273a576eac99..588ff165f4a90d9093d7446fd2a83116e4bad798 100644
--- a/chrome/browser/extensions/extension_management_test_util.h
+++ b/chrome/browser/extensions/extension_management_test_util.h
@@ -45,7 +45,25 @@ class ExtensionManagementPrefUpdaterBase {
void UnsetAllowedTypes();
void ClearAllowedTypes();
void AddAllowedType(const std::string& allowed_type);
- void RemoveAllowedType(const std::string& allowd_type);
+ void RemoveAllowedType(const std::string& allowed_type);
+
+ // Helper functions for 'blocked_permissions' manipulation. |prefix| can be
+ // kWildCard or a valid extension ID.
+ void UnsetBlockedPermissions(const std::string& prefix);
+ void ClearBlockedPermissions(const std::string& prefix);
+ void AddBlockedPermission(const std::string& prefix,
+ const std::string& permission);
+ void RemoveBlockedPermission(const std::string& prefix,
+ const std::string& permission);
+
+ // Helper functions for 'allowed_permissions' manipulation. |id| must be a
+ // valid extension id.
+ void UnsetAllowedPermissions(const std::string& id);
+ void ClearAllowedPermissions(const std::string& id);
+ void AddAllowedPermission(const std::string& id,
+ const std::string& permission);
+ void RemoveAllowedPermission(const std::string& id,
+ const std::string& permission);
// Expose a read-only preference to user.
const base::DictionaryValue* GetPref();

Powered by Google App Engine
This is Rietveld 408576698