| Index: chrome/browser/content_settings/content_settings_browsertest.cc
|
| diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc
|
| index af3aac5704b80d8fc2539ada2309ffdbea9696d8..5b7a6aaa39e902155ca53b06e4d66cb4b9f5240e 100644
|
| --- a/chrome/browser/content_settings/content_settings_browsertest.cc
|
| +++ b/chrome/browser/content_settings/content_settings_browsertest.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/content_settings/cookie_settings_factory.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/net/url_request_mock_util.h"
|
| #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
|
| @@ -239,8 +240,9 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsTest, RedirectLoopCookies) {
|
| IN_PROC_BROWSER_TEST_F(ContentSettingsTest, ContentSettingsBlockDataURLs) {
|
| GURL url("data:text/html,<title>Data URL</title><script>alert(1)</script>");
|
|
|
| - browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
|
| + HostContentSettingsMapFactory::GetForProfile(browser()->profile())
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_JAVASCRIPT,
|
| + CONTENT_SETTING_BLOCK);
|
|
|
| ui_test_utils::NavigateToURL(browser(), url);
|
|
|
| @@ -431,8 +433,9 @@ class PepperContentSettingsSpecialCasesPluginsBlockedTest
|
| public:
|
| void SetUpOnMainThread() override {
|
| PepperContentSettingsSpecialCasesTest::SetUpOnMainThread();
|
| - browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK);
|
| + HostContentSettingsMapFactory::GetForProfile(browser()->profile())
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| + CONTENT_SETTING_BLOCK);
|
| }
|
| };
|
|
|
| @@ -441,10 +444,12 @@ class PepperContentSettingsSpecialCasesJavaScriptBlockedTest
|
| public:
|
| void SetUpOnMainThread() override {
|
| PepperContentSettingsSpecialCasesTest::SetUpOnMainThread();
|
| - browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW);
|
| - browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_JAVASCRIPT, CONTENT_SETTING_BLOCK);
|
| + HostContentSettingsMapFactory::GetForProfile(browser()->profile())
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| + CONTENT_SETTING_ALLOW);
|
| + HostContentSettingsMapFactory::GetForProfile(browser()->profile())
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_JAVASCRIPT,
|
| + CONTENT_SETTING_BLOCK);
|
| }
|
| };
|
|
|
| @@ -458,8 +463,9 @@ IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesTest, Baseline) {
|
| switches::kAshBrowserTests))
|
| return;
|
| #endif
|
| - browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_ALLOW);
|
| + HostContentSettingsMapFactory::GetForProfile(browser()->profile())
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| + CONTENT_SETTING_ALLOW);
|
|
|
| RunLoadPepperPluginTest(kExternalClearKeyMimeType, true);
|
| }
|
|
|