| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 void RawResource::didAddClient(ResourceClient* c) | 103 void RawResource::didAddClient(ResourceClient* c) |
| 104 { | 104 { |
| 105 if (!hasClient(c)) | 105 if (!hasClient(c)) |
| 106 return; | 106 return; |
| 107 // The calls to the client can result in events running, potentially causing | 107 // The calls to the client can result in events running, potentially causing |
| 108 // this resource to be evicted from the cache and all clients to be removed, | 108 // this resource to be evicted from the cache and all clients to be removed, |
| 109 // so a protector is necessary. | 109 // so a protector is necessary. |
| 110 RefPtrWillBeRawPtr<RawResource> protect(this); | 110 RefPtrWillBeRawPtr<RawResource> protect(this); |
| 111 ASSERT(c->resourceClientType() == RawResourceClient::expectedType()); | 111 ASSERT(c->getResourceClientType() == RawResourceClient::expectedType()); |
| 112 RawResourceClient* client = static_cast<RawResourceClient*>(c); | 112 RawResourceClient* client = static_cast<RawResourceClient*>(c); |
| 113 for (const auto& redirect : redirectChain()) { | 113 for (const auto& redirect : redirectChain()) { |
| 114 ResourceRequest request(redirect.m_request); | 114 ResourceRequest request(redirect.m_request); |
| 115 client->redirectReceived(this, request, redirect.m_redirectResponse); | 115 client->redirectReceived(this, request, redirect.m_redirectResponse); |
| 116 if (!hasClient(c)) | 116 if (!hasClient(c)) |
| 117 return; | 117 return; |
| 118 } | 118 } |
| 119 | 119 |
| 120 if (!m_response.isNull()) | 120 if (!m_response.isNull()) |
| 121 client->responseReceived(this, m_response, nullptr); | 121 client->responseReceived(this, m_response, nullptr); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 for (const auto& header : oldHeaders) { | 266 for (const auto& header : oldHeaders) { |
| 267 AtomicString headerName = header.key; | 267 AtomicString headerName = header.key; |
| 268 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 268 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 269 return false; | 269 return false; |
| 270 } | 270 } |
| 271 | 271 |
| 272 return true; | 272 return true; |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |