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

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

Issue 2525943002: Display content settings for extensions with extension name. (Closed)
Patch Set: fix missing . Created 4 years, 1 month 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 337030021aea39818b40cafd80862eb943677cd4..a43a066d75e542308133dd8ef4bedb3c535532ec 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -942,10 +942,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();
@@ -1089,8 +1091,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",
@@ -1115,9 +1120,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