Chromium Code Reviews| 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); |