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

Unified Diff: chrome/browser/banners/app_banner_settings_helper.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 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/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 e4dcf7d6725bb6ac822b3763e2a0dd5b2621e6a1..99e88cdcef5d4fd0da0cf4574eb985be61128896 100644
--- a/chrome/browser/banners/app_banner_settings_helper.cc
+++ b/chrome/browser/banners/app_banner_settings_helper.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/banners/app_banner_data_fetcher.h"
#include "chrome/browser/banners/app_banner_metrics.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
@@ -162,7 +163,8 @@ void UpdateMinutesBetweenVisits() {
void AppBannerSettingsHelper::ClearHistoryForURLs(
Profile* profile,
const std::set<GURL>& origin_urls) {
- HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings =
+ HostContentSettingsMapFactory::GetForProfile(profile);
for (const GURL& origin_url : origin_urls) {
ContentSettingsPattern pattern(ContentSettingsPattern::FromURL(origin_url));
if (!pattern.IsValid())
@@ -230,7 +232,8 @@ void AppBannerSettingsHelper::RecordBannerEvent(
if (!pattern.IsValid())
return;
- HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings =
+ HostContentSettingsMapFactory::GetForProfile(profile);
scoped_ptr<base::DictionaryValue> origin_dict =
GetOriginDict(settings, origin_url);
if (!origin_dict)
@@ -274,7 +277,8 @@ void AppBannerSettingsHelper::RecordBannerCouldShowEvent(
if (!pattern.IsValid())
return;
- HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings =
+ HostContentSettingsMapFactory::GetForProfile(profile);
scoped_ptr<base::DictionaryValue> origin_dict =
GetOriginDict(settings, origin_url);
if (!origin_dict)
@@ -416,7 +420,8 @@ AppBannerSettingsHelper::GetCouldShowBannerEvents(
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings =
+ HostContentSettingsMapFactory::GetForProfile(profile);
scoped_ptr<base::DictionaryValue> origin_dict =
GetOriginDict(settings, origin_url);
@@ -464,7 +469,8 @@ base::Time AppBannerSettingsHelper::GetSingleBannerEvent(
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
- HostContentSettingsMap* settings = profile->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings =
+ HostContentSettingsMapFactory::GetForProfile(profile);
scoped_ptr<base::DictionaryValue> origin_dict =
GetOriginDict(settings, origin_url);
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698