| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 client->responseReceived(this, m_response); | 68 client->responseReceived(this, m_response); |
| 69 if (!hasClient(c)) | 69 if (!hasClient(c)) |
| 70 return; | 70 return; |
| 71 if (m_data) | 71 if (m_data) |
| 72 client->dataReceived(this, m_data->data(), m_data->size()); | 72 client->dataReceived(this, m_data->data(), m_data->size()); |
| 73 if (!hasClient(c)) | 73 if (!hasClient(c)) |
| 74 return; | 74 return; |
| 75 Resource::didAddClient(client); | 75 Resource::didAddClient(client); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void RawResource::willSendRequest(ResourceRequest& request, const ResourceRespon
se& response) | 78 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Response& redirectResponse) |
| 79 { | 79 { |
| 80 ResourcePtr<RawResource> protect(this); | 80 ResourcePtr<RawResource> protect(this); |
| 81 if (!response.isNull()) { | 81 if (!redirectResponse.isNull()) { |
| 82 ResourceClientWalker<RawResourceClient> w(m_clients); | 82 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 83 while (RawResourceClient* c = w.next()) | 83 while (RawResourceClient* c = w.next()) |
| 84 c->redirectReceived(this, request, response); | 84 c->redirectReceived(this, newRequest, redirectResponse); |
| 85 } | 85 } |
| 86 Resource::willSendRequest(request, response); | 86 Resource::willFollowRedirect(newRequest, redirectResponse); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void RawResource::updateRequest(const ResourceRequest& request) | 89 void RawResource::updateRequest(const ResourceRequest& request) |
| 90 { | 90 { |
| 91 ResourcePtr<RawResource> protect(this); | 91 ResourcePtr<RawResource> protect(this); |
| 92 ResourceClientWalker<RawResourceClient> w(m_clients); | 92 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 93 while (RawResourceClient* c = w.next()) | 93 while (RawResourceClient* c = w.next()) |
| 94 c->updateRequest(this, request); | 94 c->updateRequest(this, request); |
| 95 } | 95 } |
| 96 | 96 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 for (const auto& header : oldHeaders) { | 179 for (const auto& header : oldHeaders) { |
| 180 AtomicString headerName = header.key; | 180 AtomicString headerName = header.key; |
| 181 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 181 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 182 return false; | 182 return false; |
| 183 } | 183 } |
| 184 | 184 |
| 185 return true; | 185 return true; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace blink | 188 } // namespace blink |
| OLD | NEW |