| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 SECURITY_DCHECK(executionContext.isWorkerGlobalScope()); | 74 SECURITY_DCHECK(executionContext.isWorkerGlobalScope()); |
| 75 | 75 |
| 76 ThreadableLoaderOptions options; | 76 ThreadableLoaderOptions options; |
| 77 options.crossOriginRequestPolicy = crossOriginRequestPolicy; | 77 options.crossOriginRequestPolicy = crossOriginRequestPolicy; |
| 78 // FIXME: Should we add EnforceScriptSrcDirective here? | 78 // FIXME: Should we add EnforceScriptSrcDirective here? |
| 79 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy; | 79 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy; |
| 80 | 80 |
| 81 ResourceLoaderOptions resourceLoaderOptions; | 81 ResourceLoaderOptions resourceLoaderOptions; |
| 82 resourceLoaderOptions.allowCredentials = AllowStoredCredentials; | 82 resourceLoaderOptions.allowCredentials = AllowStoredCredentials; |
| 83 | 83 |
| 84 WorkerThreadableLoader::loadResourceSynchronously( | 84 ThreadableLoader::loadResourceSynchronously( |
| 85 toWorkerGlobalScope(executionContext), request, *this, options, | 85 toWorkerGlobalScope(executionContext), request, *this, options, |
| 86 resourceLoaderOptions); | 86 resourceLoaderOptions); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void WorkerScriptLoader::loadAsynchronously( | 89 void WorkerScriptLoader::loadAsynchronously( |
| 90 ExecutionContext& executionContext, | 90 ExecutionContext& executionContext, |
| 91 const KURL& url, | 91 const KURL& url, |
| 92 CrossOriginRequestPolicy crossOriginRequestPolicy, | 92 CrossOriginRequestPolicy crossOriginRequestPolicy, |
| 93 WebAddressSpace creationAddressSpace, | 93 WebAddressSpace creationAddressSpace, |
| 94 std::unique_ptr<WTF::Closure> responseCallback, | 94 std::unique_ptr<WTF::Closure> responseCallback, |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 !response.url().protocolIs("file") && | 257 !response.url().protocolIs("file") && |
| 258 !response.url().protocolIs("filesystem")) { | 258 !response.url().protocolIs("filesystem")) { |
| 259 m_contentSecurityPolicy = ContentSecurityPolicy::create(); | 259 m_contentSecurityPolicy = ContentSecurityPolicy::create(); |
| 260 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); | 260 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); |
| 261 m_contentSecurityPolicy->didReceiveHeaders( | 261 m_contentSecurityPolicy->didReceiveHeaders( |
| 262 ContentSecurityPolicyResponseHeaders(response)); | 262 ContentSecurityPolicyResponseHeaders(response)); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace blink | 266 } // namespace blink |
| OLD | NEW |