diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index f28099931f30..81bf0efd5377 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -113,6 +113,10 @@ void RendererClientBase::RenderThreadStarted() { blink::SchemeRegistry::RegisterURLSchemeAsSecure( WTF::String::FromUTF8(scheme.data(), scheme.length())); + // Allow file scheme to handle service worker by default. + // FIXME(zcbenz): Can this be moved elsewhere? + blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file"); + preferences_manager_.reset(new PreferencesManager); #if defined(OS_WIN) @@ -145,10 +149,6 @@ void RendererClientBase::RenderFrameCreated( new ContentSettingsObserver(render_frame); new printing::PrintWebViewHelper(render_frame); - // Allow file scheme to handle service worker by default. - // FIXME(zcbenz): Can this be moved elsewhere? - blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file"); - // This is required for widevine plugin detection provided during runtime. blink::ResetPluginCache();