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

Unified Diff: chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc

Issue 1690043004: Use GURLs instead of patterns in SetContentSetting() in geolocation and push_messaging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoping_set_content_setting
Patch Set: remove CustomScope due to depending CL update 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 | « chrome/browser/push_messaging/push_messaging_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc b/chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc
index 68477c0db3ba7b22f632b17581d1dbcbed71fe50..14acbfa02455e4b96620e60e8e14a87ebfb2d0a6 100644
--- a/chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_permission_context_unittest.cc
@@ -61,20 +61,19 @@ class PushMessagingPermissionContextTest
void SetContentSetting(Profile* profile,
ContentSettingsType setting,
ContentSetting value) {
- // These patterns must match those in
+ // These urls must match those in
// PermissionContextBase::UpdateContentSetting, since the tests below use
- // this method to overwrite patterns set as a result of
+ // this method to overwrite urls set as a result of
// PushMessagingPermissionContext::NotifyPermissionSet.
- ContentSettingsPattern pattern_a =
- ContentSettingsPattern::FromURLNoWildcard(GURL(kOriginA));
- ContentSettingsPattern insecure_pattern =
- ContentSettingsPattern::FromURLNoWildcard(GURL(kInsecureOrigin));
+ GURL url_a = GURL(kOriginA);
+ GURL insecure_url = GURL(kInsecureOrigin);
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(profile);
- host_content_settings_map->SetContentSetting(pattern_a, pattern_a, setting,
- std::string(), value);
- host_content_settings_map->SetContentSetting(
- insecure_pattern, insecure_pattern, setting, std::string(), value);
+
+ host_content_settings_map->SetContentSettingDefaultScope(
+ url_a, url_a, setting, std::string(), value);
+ host_content_settings_map->SetContentSettingDefaultScope(
+ insecure_url, insecure_url, setting, std::string(), value);
}
};
« no previous file with comments | « chrome/browser/push_messaging/push_messaging_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698