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

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

Issue 243803004: options: loosen up ContentSettingsHandler::RemoveException() as the JS sometimes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49e936e3411cb31e3163042fd3090427227631d5..afe6c3aadb0cedd5648d21103a35b178c0e7343f 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -169,9 +169,9 @@ base::DictionaryValue* GetExceptionForPage(
base::DictionaryValue* exception = new base::DictionaryValue();
exception->SetString(kOrigin, pattern.ToString());
exception->SetString(kEmbeddingOrigin,
- secondary_pattern == ContentSettingsPattern::Wildcard()
- ? std::string()
- : secondary_pattern.ToString());
+ secondary_pattern == ContentSettingsPattern::Wildcard() ?
+ std::string() :
+ secondary_pattern.ToString());
exception->SetString(kSetting, ContentSettingToString(setting));
exception->SetString(kSource, provider_name);
return exception;
@@ -1209,9 +1209,9 @@ void ContentSettingsHandler::RemoveExceptionFromHostContentSettingsMap(
rv = args->GetString(2, &pattern);
DCHECK(rv);
+ // The third argument to this handler is optional.
std::string secondary_pattern;
- rv = args->GetString(3, &secondary_pattern);
- DCHECK(rv);
+ args->GetString(3, &secondary_pattern);
Lei Zhang 2014/04/25 02:28:16 This can fail either before 3 is out of bounds or
Dan Beam 2014/04/25 04:11:08 Done.
HostContentSettingsMap* settings_map =
mode == "normal" ? GetContentSettingsMap() :
@@ -1219,9 +1219,9 @@ void ContentSettingsHandler::RemoveExceptionFromHostContentSettingsMap(
if (settings_map) {
settings_map->SetWebsiteSetting(
ContentSettingsPattern::FromString(pattern),
- secondary_pattern.empty()
- ? ContentSettingsPattern::Wildcard()
- : ContentSettingsPattern::FromString(secondary_pattern),
+ secondary_pattern.empty() ?
+ ContentSettingsPattern::Wildcard() :
+ ContentSettingsPattern::FromString(secondary_pattern),
type,
std::string(),
NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698