| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 BlobRegistry::registerPublicBlobURL(executionContext.securityOrigin(), m
_urlForReading, blobData); | 94 BlobRegistry::registerPublicBlobURL(executionContext.securityOrigin(), m
_urlForReading, blobData); |
| 95 } else { | 95 } else { |
| 96 ASSERT(stream); | 96 ASSERT(stream); |
| 97 BlobRegistry::registerStreamURL(executionContext.securityOrigin(), m_url
ForReading, stream->url()); | 97 BlobRegistry::registerStreamURL(executionContext.securityOrigin(), m_url
ForReading, stream->url()); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Construct and load the request. | 100 // Construct and load the request. |
| 101 ResourceRequest request(m_urlForReading); | 101 ResourceRequest request(m_urlForReading); |
| 102 | 102 |
| 103 // FIXME: Should this really be 'internal'? Do we know anything about the ac
tual request that generated this fetch? | 103 // FIXME: Should this really be 'internal'? Do we know anything about the ac
tual request that generated this fetch? |
| 104 request.setRequestContext(blink::WebURLRequest::RequestContextInternal); | 104 request.setRequestContext(WebURLRequest::RequestContextInternal); |
| 105 | 105 |
| 106 request.setHTTPMethod("GET"); | 106 request.setHTTPMethod("GET"); |
| 107 if (m_hasRange) | 107 if (m_hasRange) |
| 108 request.setHTTPHeaderField("Range", AtomicString(String::format("bytes=%
d-%d", m_rangeStart, m_rangeEnd))); | 108 request.setHTTPHeaderField("Range", AtomicString(String::format("bytes=%
d-%d", m_rangeStart, m_rangeEnd))); |
| 109 | 109 |
| 110 ThreadableLoaderOptions options; | 110 ThreadableLoaderOptions options; |
| 111 options.preflightPolicy = ConsiderPreflight; | 111 options.preflightPolicy = ConsiderPreflight; |
| 112 options.crossOriginRequestPolicy = DenyCrossOriginRequests; | 112 options.crossOriginRequestPolicy = DenyCrossOriginRequests; |
| 113 // FIXME: Is there a directive to which this load should be subject? | 113 // FIXME: Is there a directive to which this load should be subject? |
| 114 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy
; | 114 options.contentSecurityPolicyEnforcement = DoNotEnforceContentSecurityPolicy
; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 m_stringResult = builder.toString(); | 400 m_stringResult = builder.toString(); |
| 401 } | 401 } |
| 402 | 402 |
| 403 void FileReaderLoader::setEncoding(const String& encoding) | 403 void FileReaderLoader::setEncoding(const String& encoding) |
| 404 { | 404 { |
| 405 if (!encoding.isEmpty()) | 405 if (!encoding.isEmpty()) |
| 406 m_encoding = WTF::TextEncoding(encoding); | 406 m_encoding = WTF::TextEncoding(encoding); |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace blink | 409 } // namespace blink |
| OLD | NEW |