| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 { | 132 { |
| 133 Resource::willFollowRedirect(newRequest, redirectResponse); | 133 Resource::willFollowRedirect(newRequest, redirectResponse); |
| 134 | 134 |
| 135 RawPtr<RawResource> protect(this); | 135 RawPtr<RawResource> protect(this); |
| 136 ASSERT(!redirectResponse.isNull()); | 136 ASSERT(!redirectResponse.isNull()); |
| 137 ResourceClientWalker<RawResourceClient> w(m_clients); | 137 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 138 while (RawResourceClient* c = w.next()) | 138 while (RawResourceClient* c = w.next()) |
| 139 c->redirectReceived(this, newRequest, redirectResponse); | 139 c->redirectReceived(this, newRequest, redirectResponse); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void RawResource::willNotFollowRedirect() |
| 143 { |
| 144 RawPtr<RawResource> protect(this); |
| 145 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 146 while (RawResourceClient* c = w.next()) |
| 147 c->redirectBlocked(); |
| 148 } |
| 149 |
| 142 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) | 150 void RawResource::responseReceived(const ResourceResponse& response, PassOwnPtr<
WebDataConsumerHandle> handle) |
| 143 { | 151 { |
| 144 RawPtr<RawResource> protect(this); | 152 RawPtr<RawResource> protect(this); |
| 145 | 153 |
| 146 bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCod
e() == 304; | 154 bool isSuccessfulRevalidation = isCacheValidator() && response.httpStatusCod
e() == 304; |
| 147 Resource::responseReceived(response, nullptr); | 155 Resource::responseReceived(response, nullptr); |
| 148 | 156 |
| 149 ResourceClientWalker<RawResourceClient> w(m_clients); | 157 ResourceClientWalker<RawResourceClient> w(m_clients); |
| 150 ASSERT(count() <= 1 || !handle); | 158 ASSERT(count() <= 1 || !handle); |
| 151 while (RawResourceClient* c = w.next()) { | 159 while (RawResourceClient* c = w.next()) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 for (const auto& header : oldHeaders) { | 267 for (const auto& header : oldHeaders) { |
| 260 AtomicString headerName = header.key; | 268 AtomicString headerName = header.key; |
| 261 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 269 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
| 262 return false; | 270 return false; |
| 263 } | 271 } |
| 264 | 272 |
| 265 return true; | 273 return true; |
| 266 } | 274 } |
| 267 | 275 |
| 268 } // namespace blink | 276 } // namespace blink |
| OLD | NEW |