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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if (m_data) | 125 if (m_data) |
126 client->dataReceived(this, m_data->data(), m_data->size()); | 126 client->dataReceived(this, m_data->data(), m_data->size()); |
127 if (!hasClient(c)) | 127 if (!hasClient(c)) |
128 return; | 128 return; |
129 Resource::didAddClient(client); | 129 Resource::didAddClient(client); |
130 } | 130 } |
131 | 131 |
132 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Response& redirectResponse) | 132 void RawResource::willFollowRedirect(ResourceRequest& newRequest, const Resource
Response& redirectResponse) |
133 { | 133 { |
134 ResourcePtr<RawResource> protect(this); | 134 ResourcePtr<RawResource> protect(this); |
135 if (!redirectResponse.isNull()) { | 135 ASSERT(!redirectResponse.isNull()); |
136 ResourceClientWalker<RawResourceClient> w(m_clients); | 136 ResourceClientWalker<RawResourceClient> w(m_clients); |
137 while (RawResourceClient* c = w.next()) | 137 while (RawResourceClient* c = w.next()) |
138 c->redirectReceived(this, newRequest, redirectResponse); | 138 c->redirectReceived(this, newRequest, redirectResponse); |
139 } | |
140 Resource::willFollowRedirect(newRequest, redirectResponse); | 139 Resource::willFollowRedirect(newRequest, redirectResponse); |
141 } | 140 } |
142 | 141 |
143 void RawResource::updateRequest(const ResourceRequest& request) | 142 void RawResource::updateRequest(const ResourceRequest& request) |
144 { | 143 { |
145 ResourcePtr<RawResource> protect(this); | 144 ResourcePtr<RawResource> protect(this); |
146 ResourceClientWalker<RawResourceClient> w(m_clients); | 145 ResourceClientWalker<RawResourceClient> w(m_clients); |
147 while (RawResourceClient* c = w.next()) | 146 while (RawResourceClient* c = w.next()) |
148 c->updateRequest(this, request); | 147 c->updateRequest(this, request); |
149 } | 148 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 for (const auto& header : oldHeaders) { | 267 for (const auto& header : oldHeaders) { |
269 AtomicString headerName = header.key; | 268 AtomicString headerName = header.key; |
270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 269 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
271 return false; | 270 return false; |
272 } | 271 } |
273 | 272 |
274 return true; | 273 return true; |
275 } | 274 } |
276 | 275 |
277 } // namespace blink | 276 } // namespace blink |
OLD | NEW |