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

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

Issue 2298283002: Site Settings Desktop: Support adding exceptions for incognito mode. (Closed)
Patch Set: Address feedback Created 4 years, 3 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/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 071a24e705a6fa114f303c38f559900c879306e5..9c5b14b391b290e4f466b7352a14e725a93ef4af 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -947,8 +947,11 @@ void ContentSettingsHandler::CompareMediaExceptionsWithFlash(
HostContentSettingsMapFactory::GetForProfile(GetProfile());
base::ListValue exceptions;
- site_settings::GetExceptionsFromHostContentSettingsMap(settings_map, type,
- web_ui(), &exceptions);
+ site_settings::GetExceptionsFromHostContentSettingsMap(
+ settings_map, type,
+ web_ui(),
+ false, // Incognito.
dschuyler 2016/09/01 23:13:49 We can use /* */ in the parameter list. That may a
Finnur 2016/09/02 15:44:14 Done.
+ &exceptions);
settings.exceptions.clear();
for (base::ListValue::const_iterator entry = exceptions.begin();
@@ -1092,8 +1095,11 @@ void ContentSettingsHandler::UpdateExceptionsViewFromHostContentSettingsMap(
base::ListValue exceptions;
HostContentSettingsMap* settings_map =
HostContentSettingsMapFactory::GetForProfile(GetProfile());
- site_settings::GetExceptionsFromHostContentSettingsMap(settings_map, type,
- web_ui(), &exceptions);
+ site_settings::GetExceptionsFromHostContentSettingsMap(
+ settings_map, type,
+ web_ui(),
+ false, // Incognito.
+ &exceptions);
base::StringValue type_string(
site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setExceptions",
@@ -1129,7 +1135,11 @@ void ContentSettingsHandler::UpdateExceptionsViewFromOTRHostContentSettingsMap(
return;
base::ListValue exceptions;
site_settings::GetExceptionsFromHostContentSettingsMap(
- otr_settings_map, type, web_ui(), &exceptions);
+ otr_settings_map,
+ type,
+ web_ui(),
+ true, // Incognito.
+ &exceptions);
base::StringValue type_string(
site_settings::ContentSettingsTypeToGroupName(type));
web_ui()->CallJavascriptFunctionUnsafe("ContentSettings.setOTRExceptions",

Powered by Google App Engine
This is Rietveld 408576698