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

Unified Diff: content/browser/child_process_security_policy_impl.h

Issue 334413004: Add URL origin checks for Service Worker (un)registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: content/browser/child_process_security_policy_impl.h
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index 005292cdf2b6842ee189554fde93875e8fed0774..ba73285af51827574d0a0a399d8cc23f4375db2b 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -189,6 +189,14 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
// Returns true if sending system exclusive messages is allowed.
bool CanSendMidiSysExMessage(int child_id);
+ // Returns true if the specified document can register or unregister a service
+ // worker from |script_url| for scope |pattern|.
+ bool CanRegisterServiceWorker(const GURL& document_url,
+ const GURL& pattern,
+ const GURL& script_url);
+ bool CanUnregisterServiceWorker(const GURL& document_url,
+ const GURL& pattern);
+
private:
friend class ChildProcessSecurityPolicyInProcessBrowserTest;
friend class ChildProcessSecurityPolicyTest;

Powered by Google App Engine
This is Rietveld 408576698