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

Unified Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 1417563005: [Extensions] Migrate ServiceWorker off behavior feature system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
diff --git a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
index 1f51be73a0e07940e851236a15bc613f43d772db..44bc83b87ec25c635862ccc51ad32a0d8d7a4c45 100644
--- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
+++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
@@ -28,6 +28,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
+#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/feature_switch.h"
#include "extensions/common/permissions/manifest_permission_set.h"
@@ -260,4 +261,9 @@ void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(
void ChromeExtensionsDispatcherDelegate::SetChannel(int channel) {
extensions::SetCurrentChannel(static_cast<version_info::Channel>(channel));
+ if (extensions::GetCurrentChannel() == version_info::Channel::UNKNOWN) {
+ // chrome-extension: resources should be allowed to register ServiceWorkers.
+ blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers(
+ blink::WebString::fromUTF8(extensions::kExtensionScheme));
+ }
}
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698