summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/background_sync/background_sync_permission_context_unittest.cc9
-rw-r--r--chrome/browser/extensions/webstore_inline_installer_browsertest.cc8
-rw-r--r--chrome/browser/profile_resetter/profile_resetter_unittest.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc6
4 files changed, 12 insertions, 19 deletions
diff --git a/chrome/browser/background_sync/background_sync_permission_context_unittest.cc b/chrome/browser/background_sync/background_sync_permission_context_unittest.cc
index 62f9839..aa6e24c 100644
--- a/chrome/browser/background_sync/background_sync_permission_context_unittest.cc
+++ b/chrome/browser/background_sync/background_sync_permission_context_unittest.cc
@@ -87,11 +87,10 @@ TEST_F(BackgroundSyncPermissionContextTest, TestBlockOrigin) {
GURL url1("https://www.example1.com");
GURL url2("https://www.example2.com");
BackgroundSyncPermissionContext permission_context(profile());
- HostContentSettingsMapFactory::GetForProfile(profile())->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url1),
- ContentSettingsPattern::FromURLNoWildcard(url1),
- CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, std::string(),
- CONTENT_SETTING_BLOCK);
+ HostContentSettingsMapFactory::GetForProfile(profile())
+ ->SetContentSettingDefaultScope(url1, GURL(),
+ CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
+ std::string(), CONTENT_SETTING_BLOCK);
NavigateAndRequestPermission(url1, &permission_context);
diff --git a/chrome/browser/extensions/webstore_inline_installer_browsertest.cc b/chrome/browser/extensions/webstore_inline_installer_browsertest.cc
index adc4f57..eba0821 100644
--- a/chrome/browser/extensions/webstore_inline_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_inline_installer_browsertest.cc
@@ -241,11 +241,9 @@ IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerTest,
GenerateTestServerUrl(kAppDomain, "install_from_popup.html");
// Disable popup blocking for the test url.
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURL(install_url),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_POPUPS,
- std::string(),
- CONTENT_SETTING_ALLOW);
+ ->SetContentSettingDefaultScope(install_url, GURL(),
+ CONTENT_SETTINGS_TYPE_POPUPS,
+ std::string(), CONTENT_SETTING_ALLOW);
ui_test_utils::NavigateToURL(browser(), install_url);
// The test page opens a popup which is a new |browser| window.
Browser* popup_browser =
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index 7a34e6e..566b788 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -491,8 +491,7 @@ TEST_F(ProfileResetterTest, ResetHomepagePartially) {
TEST_F(ProfileResetterTest, ResetContentSettings) {
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(profile());
- ContentSettingsPattern pattern =
- ContentSettingsPattern::FromString("[*.]example.org");
+ GURL url("http://example.org");
std::map<ContentSettingsType, ContentSetting> default_settings;
// TODO(raymes): Clean up this test so that we don't have such ugly iteration
@@ -521,9 +520,8 @@ TEST_F(ProfileResetterTest, ResetContentSettings) {
wildcard_setting);
}
if (info->IsSettingValid(site_setting)) {
- host_content_settings_map->SetContentSetting(
- pattern, ContentSettingsPattern::Wildcard(), content_type,
- std::string(), site_setting);
+ host_content_settings_map->SetContentSettingDefaultScope(
+ url, url, content_type, std::string(), site_setting);
ContentSettingsForOneType host_settings;
host_content_settings_map->GetSettingsForOneType(
content_type, std::string(), &host_settings);
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 52a094f..8b099a0 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -1064,10 +1064,8 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest,
IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SubResourceHitOnFreshTab) {
// Allow popups.
HostContentSettingsMapFactory::GetForProfile(browser()->profile())
- ->SetContentSetting(ContentSettingsPattern::Wildcard(),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_POPUPS, std::string(),
- CONTENT_SETTING_ALLOW);
+ ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_POPUPS,
+ CONTENT_SETTING_ALLOW);
// Add |kMalwareImg| to fake safebrowsing db.
GURL img_url = embedded_test_server()->GetURL(kMalwareImg);