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

Unified Diff: chrome/browser/content_settings/content_settings_usages_state_unittest.cc

Issue 1686343002: Change HostContentSettingsMap::SetContentSetting to use GURLs instead of patterns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor change in comments Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/content_settings_usages_state_unittest.cc
diff --git a/chrome/browser/content_settings/content_settings_usages_state_unittest.cc b/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
index 8fcbb67ca79ab1afbd1c19c029d667661b462d1b..6c9188945f8a5442f827784c9868aab303ede8d1 100644
--- a/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_usages_state_unittest.cc
@@ -46,21 +46,15 @@ class ContentSettingsUsagesStateTests : public testing::Test {
CreateDetailsWithURL(url_0);
state.DidNavigate(details);
- HostContentSettingsMapFactory::GetForProfile(&profile)->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- type,
- std::string(),
- CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(&profile)
+ ->SetContentSettingDefaultScope(url_0, url_0, type, std::string(),
+ CONTENT_SETTING_ALLOW);
state.OnPermissionSet(url_0, true);
GURL url_1("http://www.example1.com");
- HostContentSettingsMapFactory::GetForProfile(&profile)->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url_1),
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- type,
- std::string(),
- CONTENT_SETTING_BLOCK);
+ HostContentSettingsMapFactory::GetForProfile(&profile)
+ ->SetContentSettingDefaultScope(url_1, url_0, type, std::string(),
+ CONTENT_SETTING_BLOCK);
state.OnPermissionSet(url_1, false);
ContentSettingsUsagesState::StateMap state_map =
@@ -152,30 +146,21 @@ class ContentSettingsUsagesStateTests : public testing::Test {
CreateDetailsWithURL(url_0);
state.DidNavigate(details);
- HostContentSettingsMapFactory::GetForProfile(&profile)->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- type,
- std::string(),
- CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(&profile)
+ ->SetContentSettingDefaultScope(url_0, url_0, type, std::string(),
+ CONTENT_SETTING_ALLOW);
state.OnPermissionSet(url_0, true);
GURL url_1("https://www.example.com");
- HostContentSettingsMapFactory::GetForProfile(&profile)->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url_1),
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- type,
- std::string(),
- CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(&profile)
+ ->SetContentSettingDefaultScope(url_1, url_0, type, std::string(),
+ CONTENT_SETTING_ALLOW);
state.OnPermissionSet(url_1, true);
GURL url_2("http://www.example1.com");
- HostContentSettingsMapFactory::GetForProfile(&profile)->SetContentSetting(
- ContentSettingsPattern::FromURLNoWildcard(url_2),
- ContentSettingsPattern::FromURLNoWildcard(url_0),
- type,
- std::string(),
- CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(&profile)
+ ->SetContentSettingDefaultScope(url_2, url_0, type, std::string(),
+ CONTENT_SETTING_ALLOW);
state.OnPermissionSet(url_2, true);
ContentSettingsUsagesState::StateMap state_map =
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698