| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 m_client = 0; | 75 m_client = 0; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void DocumentThreadableLoader::willSendRequest(SubresourceLoader*, ResourceReque
st& request, const ResourceResponse&) | 78 void DocumentThreadableLoader::willSendRequest(SubresourceLoader*, ResourceReque
st& request, const ResourceResponse&) |
| 79 { | 79 { |
| 80 ASSERT(m_client); | 80 ASSERT(m_client); |
| 81 | 81 |
| 82 // FIXME: This needs to be fixed to follow the redirect correctly even for c
ross-domain requests. | 82 // FIXME: This needs to be fixed to follow the redirect correctly even for c
ross-domain requests. |
| 83 if (!m_document->securityOrigin()->canRequest(request.url())) { | 83 if (!m_document->securityOrigin()->canRequest(request.url())) { |
| 84 RefPtr<DocumentThreadableLoader> protect(this); | 84 RefPtr<DocumentThreadableLoader> protect(this); |
| 85 m_client->didFailWillSendRequestCheck(); | 85 m_client->didFailRedirectCheck(); |
| 86 cancel(); | 86 cancel(); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 void DocumentThreadableLoader::didSendData(SubresourceLoader*, unsigned long lon
g bytesSent, unsigned long long totalBytesToBeSent) | 90 void DocumentThreadableLoader::didSendData(SubresourceLoader*, unsigned long lon
g bytesSent, unsigned long long totalBytesToBeSent) |
| 91 { | 91 { |
| 92 ASSERT(m_client); | 92 ASSERT(m_client); |
| 93 m_client->didSendData(bytesSent, totalBytesToBeSent); | 93 m_client->didSendData(bytesSent, totalBytesToBeSent); |
| 94 } | 94 } |
| 95 | 95 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 118 m_client->didFail(error); | 118 m_client->didFail(error); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void DocumentThreadableLoader::receivedCancellation(SubresourceLoader*, const Au
thenticationChallenge& challenge) | 121 void DocumentThreadableLoader::receivedCancellation(SubresourceLoader*, const Au
thenticationChallenge& challenge) |
| 122 { | 122 { |
| 123 ASSERT(m_client); | 123 ASSERT(m_client); |
| 124 m_client->didReceiveAuthenticationCancellation(challenge.failureResponse()); | 124 m_client->didReceiveAuthenticationCancellation(challenge.failureResponse()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace WebCore | 127 } // namespace WebCore |
| OLD | NEW |