| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 void RawResource::willNotFollowRedirect() | 138 void RawResource::willNotFollowRedirect() |
| 139 { | 139 { |
| 140 ResourceClientWalker<RawResourceClient> w(m_clients); | 140 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 141 while (RawResourceClient* c = w.next()) | 141 while (RawResourceClient* c = w.next()) |
| 142 c->redirectBlocked(); | 142 c->redirectBlocked(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) | 145 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) |
| 146 { | 146 { |
| 147 bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCod
e() == 304; | 147 bool isSuccessfulRevalidation = m_isRevalidating && response.httpStatusCode(
) == 304; |
| 148 Resource::responseReceived(response, nullptr); | 148 Resource::responseReceived(response, nullptr); |
| 149 | 149 |
| 150 ResourceClientWalker<RawResourceClient> w(m_clients); | 150 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 151 ASSERT(count() <= 1 || !handle); | 151 ASSERT(count() <= 1 || !handle); |
| 152 while (RawResourceClient* c = w.next()) { | 152 while (RawResourceClient* c = w.next()) { |
| 153 // |handle| is cleared when passed, but it's not a problem because | 153 // |handle| is cleared when passed, but it's not a problem because |
| 154 // |handle| is null when there are two or more clients, as asserted. | 154 // |handle| is null when there are two or more clients, as asserted. |
| 155 c->responseReceived(this, m_response, std::move(handle)); | 155 c->responseReceived(this, m_response, std::move(handle)); |
| 156 } | 156 } |
| 157 | 157 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 for (const auto& header : oldHeaders) { | 258 for (const auto& header : oldHeaders) { |
| 259 AtomicString headerName = header.key; | 259 AtomicString headerName = header.key; |
| 260 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 260 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 261 return false; | 261 return false; |
| 262 } | 262 } |
| 263 | 263 |
| 264 return true; | 264 return true; |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |