| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 return; | 404 return; |
| 405 } | 405 } |
| 406 | 406 |
| 407 // FIXME: ThreadableLoaderOptions.sniffContent is not supported for synchron
ous requests. | 407 // FIXME: ThreadableLoaderOptions.sniffContent is not supported for synchron
ous requests. |
| 408 Vector<char> data; | 408 Vector<char> data; |
| 409 ResourceError error; | 409 ResourceError error; |
| 410 ResourceResponse response; | 410 ResourceResponse response; |
| 411 unsigned long identifier = std::numeric_limits<unsigned long>::max(); | 411 unsigned long identifier = std::numeric_limits<unsigned long>::max(); |
| 412 if (Frame* frame = m_document->frame()) { | 412 if (Frame* frame = m_document->frame()) { |
| 413 Frame* top = frame->tree()->top(); | 413 Frame* top = frame->tree()->top(); |
| 414 if (!top->loader()->mixedContentChecker()->canRunInsecureContent(top->do
cument()->securityOrigin(), requestURL)) { | 414 if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent(top
->document()->securityOrigin(), requestURL)) { |
| 415 m_client->didFail(error); | 415 m_client->didFail(error); |
| 416 return; | 416 return; |
| 417 } | 417 } |
| 418 identifier = frame->loader()->loadResourceSynchronously(request, m_optio
ns.allowCredentials, error, response, data); | 418 identifier = frame->loader()->loadResourceSynchronously(request, m_optio
ns.allowCredentials, error, response, data); |
| 419 } | 419 } |
| 420 | 420 |
| 421 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_
document, identifier, m_client); | 421 InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_
document, identifier, m_client); |
| 422 | 422 |
| 423 // No exception for file:/// resources, see <rdar://problem/4962298>. | 423 // No exception for file:/// resources, see <rdar://problem/4962298>. |
| 424 // Also, if we have an HTTP response, then it wasn't a network error in fact
. | 424 // Also, if we have an HTTP response, then it wasn't a network error in fact
. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 return true; | 458 return true; |
| 459 return m_document->contentSecurityPolicy()->allowConnectToSource(url); | 459 return m_document->contentSecurityPolicy()->allowConnectToSource(url); |
| 460 } | 460 } |
| 461 | 461 |
| 462 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const | 462 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const |
| 463 { | 463 { |
| 464 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t->securityOrigin(); | 464 return m_options.securityOrigin ? m_options.securityOrigin.get() : m_documen
t->securityOrigin(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 } // namespace WebCore | 467 } // namespace WebCore |
| OLD | NEW |