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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 7 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/common/chrome_content_client.h ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index fb1b7585e938c6f244a148a798add730b078e62e..a2395c58f2a606fecf4d0bcc7e1387610bc069fa 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -680,6 +680,16 @@ void ChromeContentClient::AddServiceWorkerSchemes(
#endif
}
+bool ChromeContentClient::AllowScriptExtensionForServiceWorker(
+ const GURL& script_url) {
+#if defined(ENABLE_EXTENSIONS)
+ return script_url.SchemeIs(extensions::kExtensionScheme) ||
+ script_url.SchemeIs(extensions::kExtensionResourceScheme);
+#else
+ return false;
+#endif
+}
+
bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
#if defined(ENABLE_EXTENSIONS)
return extensions::IsIsolateExtensionsEnabled();
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/common/extensions/api/_api_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698