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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 ThreadableLoaderOptions options; | 76 ThreadableLoaderOptions options; |
77 options.cross_origin_request_policy = cross_origin_request_policy; | 77 options.cross_origin_request_policy = cross_origin_request_policy; |
78 // FIXME: Should we add EnforceScriptSrcDirective here? | 78 // FIXME: Should we add EnforceScriptSrcDirective here? |
79 options.content_security_policy_enforcement = | 79 options.content_security_policy_enforcement = |
80 kDoNotEnforceContentSecurityPolicy; | 80 kDoNotEnforceContentSecurityPolicy; |
81 | 81 |
82 ResourceLoaderOptions resource_loader_options; | 82 ResourceLoaderOptions resource_loader_options; |
83 resource_loader_options.allow_credentials = kAllowStoredCredentials; | 83 resource_loader_options.allow_credentials = kAllowStoredCredentials; |
84 | 84 |
85 WorkerThreadableLoader::LoadResourceSynchronously( | 85 ThreadableLoader::LoadResourceSynchronously( |
86 ToWorkerGlobalScope(execution_context), request, *this, options, | 86 ToWorkerGlobalScope(execution_context), request, *this, options, |
87 resource_loader_options); | 87 resource_loader_options); |
88 } | 88 } |
89 | 89 |
90 void WorkerScriptLoader::LoadAsynchronously( | 90 void WorkerScriptLoader::LoadAsynchronously( |
91 ExecutionContext& execution_context, | 91 ExecutionContext& execution_context, |
92 const KURL& url, | 92 const KURL& url, |
93 CrossOriginRequestPolicy cross_origin_request_policy, | 93 CrossOriginRequestPolicy cross_origin_request_policy, |
94 WebAddressSpace creation_address_space, | 94 WebAddressSpace creation_address_space, |
95 std::unique_ptr<WTF::Closure> response_callback, | 95 std::unique_ptr<WTF::Closure> response_callback, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 !response.Url().ProtocolIs("file") && | 258 !response.Url().ProtocolIs("file") && |
259 !response.Url().ProtocolIs("filesystem")) { | 259 !response.Url().ProtocolIs("filesystem")) { |
260 content_security_policy_ = ContentSecurityPolicy::Create(); | 260 content_security_policy_ = ContentSecurityPolicy::Create(); |
261 content_security_policy_->SetOverrideURLForSelf(response.Url()); | 261 content_security_policy_->SetOverrideURLForSelf(response.Url()); |
262 content_security_policy_->DidReceiveHeaders( | 262 content_security_policy_->DidReceiveHeaders( |
263 ContentSecurityPolicyResponseHeaders(response)); | 263 ContentSecurityPolicyResponseHeaders(response)); |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 } // namespace blink | 267 } // namespace blink |
OLD | NEW |