| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return; | 123 return; |
| 124 if (m_data) | 124 if (m_data) |
| 125 client->dataReceived(this, m_data->data(), m_data->size()); | 125 client->dataReceived(this, m_data->data(), m_data->size()); |
| 126 if (!hasClient(c)) | 126 if (!hasClient(c)) |
| 127 return; | 127 return; |
| 128 Resource::didAddClient(client); | 128 Resource::didAddClient(client); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Response& redirectResponse) | 131 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Response& redirectResponse) |
| 132 { | 132 { |
| 133 Resource::willFollowRedirect(newRequest, redirectResponse); |
| 134 |
| 133 RefPtrWillBeRawPtr<RawResource> protect(this); | 135 RefPtrWillBeRawPtr<RawResource> protect(this); |
| 134 ASSERT(!redirectResponse.isNull()); | 136 ASSERT(!redirectResponse.isNull()); |
| 135 ResourceClientWalker<RawResourceClient> w(m_clients); | 137 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 136 while (RawResourceClient* c = w.next()) | 138 while (RawResourceClient* c = w.next()) |
| 137 c->redirectReceived(this, newRequest, redirectResponse); | 139 c->redirectReceived(this, newRequest, redirectResponse); |
| 138 Resource::willFollowRedirect(newRequest, redirectResponse); | |
| 139 } | 140 } |
| 140 | 141 |
| 141 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) | 142 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) |
| 142 { | 143 { |
| 143 RefPtrWillBeRawPtr<RawResource> protect(this); | 144 RefPtrWillBeRawPtr<RawResource> protect(this); |
| 144 | 145 |
| 145 bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCod
e() == 304; | 146 bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCod
e() == 304; |
| 146 Resource::responseReceived(response, nullptr); | 147 Resource::responseReceived(response, nullptr); |
| 147 | 148 |
| 148 ResourceClientWalker<RawResourceClient> w(m_clients); | 149 ResourceClientWalker<RawResourceClient> w(m_clients); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 for (const auto& header : oldHeaders) { | 259 for (const auto& header : oldHeaders) { |
| 259 AtomicString headerName = header.key; | 260 AtomicString headerName = header.key; |
| 260 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 261 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 261 return false; | 262 return false; |
| 262 } | 263 } |
| 263 | 264 |
| 264 return true; | 265 return true; |
| 265 } | 266 } |
| 266 | 267 |
| 267 } // namespace blink | 268 } // namespace blink |
| OLD | NEW |