Chromium Code Reviews| Index: chrome/browser/banners/app_banner_settings_helper.cc |
| diff --git a/chrome/browser/banners/app_banner_settings_helper.cc b/chrome/browser/banners/app_banner_settings_helper.cc |
| index 1847f506e39c27df9660e4ce65995698849d5ad4..2568ca1d326a04611d2ed361ab4251712b2e82c4 100644 |
| --- a/chrome/browser/banners/app_banner_settings_helper.cc |
| +++ b/chrome/browser/banners/app_banner_settings_helper.cc |
| @@ -79,6 +79,21 @@ base::DictionaryValue* GetAppDict(base::DictionaryValue* origin_dict, |
| } // namespace |
| +void AppBannerSettingsHelper::ClearHistoryForURLs( |
| + Profile* profile, |
| + const std::set<GURL>& origin_urls) { |
| + HostContentSettingsMap* settings = profile->GetHostContentSettingsMap(); |
| + for (const auto& origin_url : origin_urls) { |
|
Bernhard Bauer
2015/02/13 10:05:06
Using GURL instead of auto here is clearer, and no
benwells
2015/02/15 22:56:05
Done.
|
| + ContentSettingsPattern pattern(ContentSettingsPattern::FromURL(origin_url)); |
| + if (!pattern.IsValid()) |
| + continue; |
| + |
| + settings->SetWebsiteSetting(pattern, ContentSettingsPattern::Wildcard(), |
| + CONTENT_SETTINGS_TYPE_APP_BANNER, std::string(), |
| + nullptr); |
| + } |
| +} |
| + |
| void AppBannerSettingsHelper::RecordBannerEvent( |
| content::WebContents* web_contents, |
| const GURL& origin_url, |