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

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: more minor format fix 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..8189ba577c8ced91634264e41f238ea7c131a43d 100644
--- a/chrome/browser/extensions/extension_management_test_util.h
+++ b/chrome/browser/extensions/extension_management_test_util.h
@@ -47,6 +47,24 @@ class ExtensionManagementPrefUpdaterBase {
void AddAllowedType(const std::string& allowed_type);
void RemoveAllowedType(const std::string& allowd_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