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

Unified Diff: chrome/browser/ui/page_info/permission_menu_model.cc

Issue 2884813003: [subresource_filter] Add custom strings/behavior on Desktop Page Info (Closed)
Patch Set: add period Created 3 years, 7 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/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..d7bf8ca7512ed8ea5b4b3207d5519bab2d40ee1c 100644
--- a/chrome/browser/ui/page_info/permission_menu_model.cc
+++ b/chrome/browser/ui/page_info/permission_menu_model.cc
@@ -70,7 +70,9 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile,
effective_default_setting, permission_.source);
}
- AddCheckItem(CONTENT_SETTING_DEFAULT, label);
+ // The subresource filter permission does not display the default menu item.
+ if (permission_.type != CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER)
+ AddCheckItem(CONTENT_SETTING_DEFAULT, label);
// Retrieve the string to show for allowing the permission.
// Notifications does not support CONTENT_SETTING_ALLOW in incognito.
@@ -104,6 +106,10 @@ PermissionMenuModel::PermissionMenuModel(Profile* profile,
// Retrieve the string to show for blocking the permission.
label = l10n_util::GetStringUTF16(IDS_PAGE_INFO_MENU_ITEM_BLOCK);
+ if (permission_.type == CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER) {
+ label = l10n_util::GetStringUTF16(
+ IDS_PAGE_INFO_MENU_ITEM_SUBRESOURCE_FILTER_BLOCK);
+ }
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
label = PageInfoUI::PermissionActionToUIString(
profile, info.type, CONTENT_SETTING_BLOCK, effective_default_setting,

Powered by Google App Engine
This is Rietveld 408576698