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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 | 340 |
341 if (allowLoad) { | 341 if (allowLoad) { |
342 ThreadableLoaderOptions options; | 342 ThreadableLoaderOptions options; |
343 options.sniffContent = m_options.sniffContent ? SniffContent : DoNotSnif fContent; | 343 options.sniffContent = m_options.sniffContent ? SniffContent : DoNotSnif fContent; |
344 options.allowCredentials = m_options.allowCredentials ? AllowStoredCrede ntials : DoNotAllowStoredCredentials; | 344 options.allowCredentials = m_options.allowCredentials ? AllowStoredCrede ntials : DoNotAllowStoredCredentials; |
345 options.preflightPolicy = static_cast<WebCore::PreflightPolicy>(m_option s.preflightPolicy); | 345 options.preflightPolicy = static_cast<WebCore::PreflightPolicy>(m_option s.preflightPolicy); |
346 options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginReque stPolicy>(m_options.crossOriginRequestPolicy); | 346 options.crossOriginRequestPolicy = static_cast<WebCore::CrossOriginReque stPolicy>(m_options.crossOriginRequestPolicy); |
347 options.dataBufferingPolicy = DoNotBufferData; | 347 options.dataBufferingPolicy = DoNotBufferData; |
348 | 348 |
349 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); | 349 const ResourceRequest& webcoreRequest = newRequest.toResourceRequest(); |
350 // FIXME: We can not create DocumentThreadableLoader if document does no t exist for the frame. | |
Inactive
2014/03/22 15:13:06
Why the FIXME? The assertion should suffice. The c
maheshkk
2014/03/24 18:17:48
Done.
| |
350 Document* webcoreDocument = m_frameImpl->frame()->document(); | 351 Document* webcoreDocument = m_frameImpl->frame()->document(); |
351 m_loader = DocumentThreadableLoader::create(webcoreDocument, m_clientAda pter.get(), webcoreRequest, options); | 352 ASSERT(webcoreDocument); |
353 m_loader = DocumentThreadableLoader::create(*webcoreDocument, m_clientAd apter.get(), webcoreRequest, options); | |
352 } else { | 354 } else { |
353 // FIXME: return meaningful error codes. | 355 // FIXME: return meaningful error codes. |
354 m_clientAdapter->setDelayedError(ResourceError()); | 356 m_clientAdapter->setDelayedError(ResourceError()); |
355 } | 357 } |
356 m_clientAdapter->enableErrorNotifications(); | 358 m_clientAdapter->enableErrorNotifications(); |
357 } | 359 } |
358 | 360 |
359 void AssociatedURLLoader::cancel() | 361 void AssociatedURLLoader::cancel() |
360 { | 362 { |
361 if (m_clientAdapter) | 363 if (m_clientAdapter) |
362 m_clientAdapter->clearClient(); | 364 m_clientAdapter->clearClient(); |
363 if (m_loader) | 365 if (m_loader) |
364 m_loader->cancel(); | 366 m_loader->cancel(); |
365 } | 367 } |
366 | 368 |
367 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 369 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
368 { | 370 { |
369 if (m_loader) | 371 if (m_loader) |
370 m_loader->setDefersLoading(defersLoading); | 372 m_loader->setDefersLoading(defersLoading); |
371 } | 373 } |
372 | 374 |
373 } // namespace blink | 375 } // namespace blink |
OLD | NEW |