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

Unified Diff: chrome/common/extensions/permissions/chrome_permission_message_rules.cc

Issue 2470193002: Introduce networking.onc as an alias for networkingPrivate (Closed)
Patch Set: allow optional permission Created 4 years 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/permissions/chrome_permission_message_rules.cc
diff --git a/chrome/common/extensions/permissions/chrome_permission_message_rules.cc b/chrome/common/extensions/permissions/chrome_permission_message_rules.cc
index 1f5011b573fb8dca594b268dc5c361ceb3ffb70f..ec09d431509bda14db27a2eb2b720e28583fd50d 100644
--- a/chrome/common/extensions/permissions/chrome_permission_message_rules.cc
+++ b/chrome/common/extensions/permissions/chrome_permission_message_rules.cc
@@ -520,6 +520,15 @@ ChromePermissionMessageRule::GetAllRules() {
// Network-related permissions.
{IDS_EXTENSION_PROMPT_WARNING_NETWORKING_PRIVATE,
+ {APIPermission::kNetworkingOnc},
+ // Adding networkingPrivate as an optional permission for this rule so
+ // the permission is removed from the available permission set when the
+ // next rule (for networkingPrivate permission) is considered - without
+ // this, IDS_EXTENSION_PROMPT_WARNING_NETWORK_PRIVATE would be duplicated
+ // for manifests that have both networking.onc and networkingPrivate
+ // permission.
+ {APIPermission::kNetworkingPrivate}},
+ {IDS_EXTENSION_PROMPT_WARNING_NETWORKING_PRIVATE,
{APIPermission::kNetworkingPrivate},
{}},
{IDS_EXTENSION_PROMPT_WARNING_NETWORKING_CONFIG,

Powered by Google App Engine
This is Rietveld 408576698