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