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

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.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/ui/blocked_content/popup_blocker_browsertest.cc
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index 3d0fa1de2a959dc78896bcf75354b7bf3ee53df9..0aa4a7480e207b465600cce90de0c51056003bf5 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -8,6 +8,7 @@
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -343,7 +344,7 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
AllowPopupThroughContentSetting) {
GURL url(embedded_test_server()->GetURL(
"/popup_blocker/popup-blocked-to-post-blank.html"));
- browser()->profile()->GetHostContentSettingsMap()
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->SetContentSetting(ContentSettingsPattern::FromURL(url),
ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_POPUPS,
@@ -357,7 +358,7 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
AllowPopupThroughContentSettingIFrame) {
GURL url(embedded_test_server()->GetURL("/popup_blocker/popup-frames.html"));
- browser()->profile()->GetHostContentSettingsMap()
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->SetContentSetting(ContentSettingsPattern::FromURL(url),
ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_POPUPS,
@@ -374,9 +375,9 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
GURL frame_url(embedded_test_server()
->GetURL("/popup_blocker/popup-frames-iframe.html")
.ReplaceComponents(replace_host));
- browser()->profile()->GetHostContentSettingsMap()->ClearSettingsForOneType(
- CONTENT_SETTINGS_TYPE_POPUPS);
- browser()->profile()->GetHostContentSettingsMap()
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
+ ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_POPUPS);
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
->SetContentSetting(ContentSettingsPattern::FromURL(frame_url),
ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_POPUPS,
@@ -564,9 +565,12 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, ModalPopUnder) {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
GURL url(
embedded_test_server()->GetURL("/popup_blocker/popup-window-open.html"));
- browser()->profile()->GetHostContentSettingsMap()->SetContentSetting(
- ContentSettingsPattern::FromURL(url), ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_POPUPS, std::string(), CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
+ ->SetContentSetting(ContentSettingsPattern::FromURL(url),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_POPUPS,
+ std::string(),
+ CONTENT_SETTING_ALLOW);
NavigateAndCheckPopupShown(url, ExpectPopup);
« no previous file with comments | « chrome/browser/ui/app_list/test/fake_profile.cc ('k') | chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698