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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 625533002: Respect content settings for Service Worker registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testing
Patch Set: sync Created 6 years, 2 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 479ecb733adc733229b647988dc0fc24e89f440d..8ba2b71e81dd32aa58927f09a4b8167b7438cde5 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1461,6 +1461,16 @@ bool ChromeContentBrowserClient::AllowAppCache(
IsSettingCookieAllowed(manifest_url, first_party);
}
+bool ChromeContentBrowserClient::AllowServiceWorker(
+ const GURL& scope,
+ const GURL& first_party_url,
+ content::ResourceContext* context) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
+ return io_data->GetCookieSettings()->
+ IsSettingCookieAllowed(scope, first_party_url);
+}
+
bool ChromeContentBrowserClient::AllowGetCookie(
const GURL& url,
const GURL& first_party,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698