OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } | 334 } |
335 | 335 |
336 m_clientAdapter = ClientAdapter::create(this, m_client, m_options); | 336 m_clientAdapter = ClientAdapter::create(this, m_client, m_options); |
337 | 337 |
338 if (allowLoad) { | 338 if (allowLoad) { |
339 ThreadableLoaderOptions options; | 339 ThreadableLoaderOptions options; |
340 options.preflightPolicy = static_cast<PreflightPolicy>(m_options.preflig
htPolicy); | 340 options.preflightPolicy = static_cast<PreflightPolicy>(m_options.preflig
htPolicy); |
341 options.crossOriginRequestPolicy = static_cast<CrossOriginRequestPolicy>
(m_options.crossOriginRequestPolicy); | 341 options.crossOriginRequestPolicy = static_cast<CrossOriginRequestPolicy>
(m_options.crossOriginRequestPolicy); |
342 | 342 |
343 ResourceLoaderOptions resourceLoaderOptions; | 343 ResourceLoaderOptions resourceLoaderOptions; |
344 resourceLoaderOptions.sniffContent = m_options.sniffContent ? SniffConte
nt : DoNotSniffContent; | |
345 resourceLoaderOptions.allowCredentials = m_options.allowCredentials ? Al
lowStoredCredentials : DoNotAllowStoredCredentials; | 344 resourceLoaderOptions.allowCredentials = m_options.allowCredentials ? Al
lowStoredCredentials : DoNotAllowStoredCredentials; |
346 resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData; | 345 resourceLoaderOptions.dataBufferingPolicy = DoNotBufferData; |
347 | 346 |
348 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); | 347 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); |
349 if (webcoreRequest.requestContext() == WebURLRequest::RequestContextUnsp
ecified) { | 348 if (webcoreRequest.requestContext() == WebURLRequest::RequestContextUnsp
ecified) { |
350 // FIXME: We load URLs without setting a TargetType (and therefore a
request context) in several | 349 // FIXME: We load URLs without setting a TargetType (and therefore a
request context) in several |
351 // places in content/ (P2PPortAllocatorSession::AllocateLegacyRelayS
ession, for example). Remove | 350 // places in content/ (P2PPortAllocatorSession::AllocateLegacyRelayS
ession, for example). Remove |
352 // this once those places are patched up. | 351 // this once those places are patched up. |
353 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 352 newRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
354 } | 353 } |
(...skipping 16 matching lines...) Expand all Loading... |
371 m_loader->cancel(); | 370 m_loader->cancel(); |
372 } | 371 } |
373 | 372 |
374 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 373 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
375 { | 374 { |
376 if (m_loader) | 375 if (m_loader) |
377 m_loader->setDefersLoading(defersLoading); | 376 m_loader->setDefersLoading(defersLoading); |
378 } | 377 } |
379 | 378 |
380 } // namespace blink | 379 } // namespace blink |
OLD | NEW |