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..8b81362200d8d3276b7864446fa121999b08094a 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/17 00:39:12
Let's move this up above the
if (ui::MaterialDesi
Charlie Harrison
2017/05/17 14:06:07
Done. I'm keeping the string the same until we rea
|
+ |
AddCheckItem(CONTENT_SETTING_ALLOW, label); |
} |
@@ -104,6 +113,8 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile, |
// Retrieve the string to show for blocking the permission. |
label = l10n_util::GetStringUTF16(IDS_PAGE_INFO_MENU_ITEM_BLOCK); |
+ if (subresource_filter_permission) |
+ label = l10n_util::GetStringUTF16(IDS_PAGE_INFO_SUBRESOURCE_FILTER_BLOCK); |
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
label = PageInfoUI::PermissionActionToUIString( |
profile, info.type, CONTENT_SETTING_BLOCK, effective_default_setting, |