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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 2525943002: Display content settings for extensions with extension name. (Closed)
Patch Set: deduplicate by origin 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/browser/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 6e511d080ea2c66f99a9ace2eec879b9984d9ece..81f10170ab15796d8b8f4992d9bb87e7635352c5 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -943,10 +943,12 @@ void ContentSettingsHandler::CompareMediaExceptionsWithFlash(
MediaSettingsInfo::ForOneType& settings = media_settings_->forType(type);
HostContentSettingsMap* settings_map =
HostContentSettingsMapFactory::GetForProfile(GetProfile());
-
+ const auto* extension_registry =
+ extensions::ExtensionRegistry::Get(GetProfile());
base::ListValue exceptions;
- site_settings::GetExceptionsFromHostContentSettingsMap(settings_map, type,
- web_ui(), /*incognito=*/false, /*filter=*/nullptr, &exceptions);
+ site_settings::GetExceptionsFromHostContentSettingsMap(
+ settings_map, type, extension_registry, web_ui(), /*incognito=*/false,
+ /*filter=*/nullptr, &exceptions);
settings.exceptions.clear();
for (base::ListValue::const_iterator entry = exceptions.begin();
@@ -1090,8 +1092,11 @@ void ContentSettingsHandler::UpdateExceptionsViewFromHostContentSettingsMap(
base::ListValue exceptions;
HostContentSettingsMap* settings_map =
HostContentSettingsMapFactory::GetForProfile(GetProfile());
- site_settings::GetExceptionsFromHostContentSettingsMap(settings_map, type,
- web_ui(), /*incognito=*/false, /*filter=*/nullptr, &exceptions);
+ const auto* extension_registry =
+ extensions::ExtensionRegistry::Get(GetProfile());
+ site_settings::GetExceptionsFromHostContentSettingsMap(
+ settings_map, type, extension_registry, web_ui(), /*incognito=*/false,
+ /*filter=*/nullptr, &exceptions);
base::StringValue type_string(
site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
@@ -1116,9 +1121,12 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
HostContentSettingsMapFactory::GetForProfile(GetOTRProfile());
if (!otr_settings_map)
return;
+ const auto* extension_registry =
+ extensions::ExtensionRegistry::Get(GetOTRProfile());
base::ListValue exceptions;
- site_settings::GetExceptionsFromHostContentSettingsMap(otr_settings_map, type,
- web_ui(), /*incognito=*/true, /*filter=*/nullptr, &exceptions);
+ site_settings::GetExceptionsFromHostContentSettingsMap(
+ otr_settings_map, type, extension_registry, web_ui(), /*incognito=*/true,
+ /*filter=*/nullptr, &exceptions);
base::StringValue type_string(
site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setOTRExceptions",

Powered by Google App Engine
This is Rietveld 408576698