Index: chrome/browser/ui/page_info/permission_menu_model.cc |
diff --git a/chrome/browser/ui/page_info/permission_menu_model.cc b/chrome/browser/ui/page_info/permission_menu_model.cc |
index 3100323110c31c87ff98f2bdc1143d1926813bae..1b4c1e2b817ae89c1693a1ae8da1ad54a9d4d9d8 100644 |
--- a/chrome/browser/ui/page_info/permission_menu_model.cc |
+++ b/chrome/browser/ui/page_info/permission_menu_model.cc |
@@ -70,7 +70,12 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile, |
effective_default_setting, permission_.source); |
} |
- AddCheckItem(CONTENT_SETTING_DEFAULT, label); |
+ bool subresource_filter_permission = |
+ permission_.type == CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER; |
+ |
+ // The subresource filter permission does not display the default menu item. |
+ if (!subresource_filter_permission) |
+ AddCheckItem(CONTENT_SETTING_DEFAULT, label); |
// Retrieve the string to show for allowing the permission. |
// Notifications does not support CONTENT_SETTING_ALLOW in incognito. |
@@ -89,6 +94,10 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile, |
profile, permission_.type, CONTENT_SETTING_ALLOW, |
effective_default_setting, permission_.source); |
} |
+ |
+ if (subresource_filter_permission) |
+ label = l10n_util::GetStringUTF16(IDS_PAGE_INFO_SUBRESOURCE_FILTER_ALLOW); |
raymes
2017/05/15 23:41:21
Why can't we just leave this as IDS_PAGE_INFO_MENU
Charlie Harrison
2017/05/16 01:47:26
We will eventually want the string to be slightly
raymes
2017/05/16 06:19:51
Oh - I thought it would always be the same as befo
Charlie Harrison
2017/05/16 12:10:14
Followed up offline.
|
+ |
AddCheckItem(CONTENT_SETTING_ALLOW, label); |
} |
@@ -109,6 +118,8 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile, |
profile, info.type, CONTENT_SETTING_BLOCK, effective_default_setting, |
info.source); |
} |
+ if (subresource_filter_permission) |
+ label = l10n_util::GetStringUTF16(IDS_PAGE_INFO_SUBRESOURCE_FILTER_BLOCK); |
raymes
2017/05/15 23:41:21
I think we can move this up above the if (..) stat
Charlie Harrison
2017/05/16 01:47:26
You mean the IsSecondaryUiMaterial if statement? D
|
AddCheckItem(CONTENT_SETTING_BLOCK, label); |
} |