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

Unified Diff: chrome/browser/push_messaging/push_messaging_browsertest.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
Index: chrome/browser/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index 03fb92945e31173a188a84bad8409d49d2c785a0..192cdbacab9748292b60a47e5e3e0ff4f5159f0a 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -862,10 +862,9 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GURL origin = https_server()->GetURL("/").GetOrigin();
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::FromURLNoWildcard(origin),
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, std::string(),
- CONTENT_SETTING_DEFAULT);
+ ->SetContentSettingDefaultScope(origin, origin,
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
+ std::string(), CONTENT_SETTING_DEFAULT);
message_loop_runner->Run();
@@ -895,10 +894,9 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GURL origin = https_server()->GetURL("/").GetOrigin();
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::FromURLNoWildcard(origin),
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, std::string(),
- CONTENT_SETTING_BLOCK);
+ ->SetContentSettingDefaultScope(origin, origin,
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
+ std::string(), CONTENT_SETTING_BLOCK);
message_loop_runner->Run();
@@ -957,10 +955,9 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GURL origin = https_server()->GetURL("/").GetOrigin();
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(),
- CONTENT_SETTING_DEFAULT);
+ ->SetContentSettingDefaultScope(origin, GURL(),
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ std::string(), CONTENT_SETTING_DEFAULT);
message_loop_runner->Run();
@@ -990,10 +987,9 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GURL origin = https_server()->GetURL("/").GetOrigin();
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(),
- CONTENT_SETTING_BLOCK);
+ ->SetContentSettingDefaultScope(origin, GURL(),
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ std::string(), CONTENT_SETTING_BLOCK);
message_loop_runner->Run();
@@ -1023,15 +1019,13 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
GURL origin = https_server()->GetURL("/").GetOrigin();
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(),
- CONTENT_SETTING_ALLOW);
+ ->SetContentSettingDefaultScope(origin, GURL(),
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ std::string(), CONTENT_SETTING_ALLOW);
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::FromURLNoWildcard(origin),
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, std::string(),
- CONTENT_SETTING_ALLOW);
+ ->SetContentSettingDefaultScope(origin, origin,
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
+ std::string(), CONTENT_SETTING_ALLOW);
message_loop_runner->Run();
@@ -1075,15 +1069,13 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, std::string(),
CONTENT_SETTING_ALLOW);
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string(),
- CONTENT_SETTING_DEFAULT);
+ ->SetContentSettingDefaultScope(origin, GURL(),
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ std::string(), CONTENT_SETTING_DEFAULT);
HostContentSettingsMapFactory::GetForProfile(GetBrowser()->profile())
- ->SetContentSetting(ContentSettingsPattern::FromURLNoWildcard(origin),
- ContentSettingsPattern::FromURLNoWildcard(origin),
- CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, std::string(),
- CONTENT_SETTING_DEFAULT);
+ ->SetContentSettingDefaultScope(origin, origin,
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
+ std::string(), CONTENT_SETTING_DEFAULT);
message_loop_runner->Run();

Powered by Google App Engine
This is Rietveld 408576698