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

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: better diff 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..9aec4796ea29b5500e909386b193ccc9a497f2cd 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& document_url,
+ content::ResourceContext* context) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
+ return io_data->GetCookieSettings()->IsSettingCookieAllowed(scope,
michaeln 2014/10/02 20:32:51 nit: maybe use wrapping style consistent with ln 1
falken 2014/10/03 08:30:42 Done (I'd just run git-cl format and didn't check
+ document_url);
michaeln 2014/10/02 20:46:28 The docurl is not a good value for the 2nd param t
falken 2014/10/03 08:30:42 Done.
+}
+
bool ChromeContentBrowserClient::AllowGetCookie(
const GURL& url,
const GURL& first_party,

Powered by Google App Engine
This is Rietveld 408576698