OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 } | 165 } |
166 | 166 |
167 void AssociatedURLLoader::ClientAdapter::willFollowRedirect( | 167 void AssociatedURLLoader::ClientAdapter::willFollowRedirect( |
168 ResourceRequest& newRequest, | 168 ResourceRequest& newRequest, |
169 const ResourceResponse& redirectResponse) { | 169 const ResourceResponse& redirectResponse) { |
170 if (!m_client) | 170 if (!m_client) |
171 return; | 171 return; |
172 | 172 |
173 WrappedResourceRequest wrappedNewRequest(newRequest); | 173 WrappedResourceRequest wrappedNewRequest(newRequest); |
174 WrappedResourceResponse wrappedRedirectResponse(redirectResponse); | 174 WrappedResourceResponse wrappedRedirectResponse(redirectResponse); |
175 // TODO(ricea): Do we need to set encodedDataLength here? | |
176 m_client->willFollowRedirect(m_loader, wrappedNewRequest, | 175 m_client->willFollowRedirect(m_loader, wrappedNewRequest, |
177 wrappedRedirectResponse, 0); | 176 wrappedRedirectResponse); |
178 } | 177 } |
179 | 178 |
180 void AssociatedURLLoader::ClientAdapter::didSendData( | 179 void AssociatedURLLoader::ClientAdapter::didSendData( |
181 unsigned long long bytesSent, | 180 unsigned long long bytesSent, |
182 unsigned long long totalBytesToBeSent) { | 181 unsigned long long totalBytesToBeSent) { |
183 if (!m_client) | 182 if (!m_client) |
184 return; | 183 return; |
185 | 184 |
186 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent); | 185 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent); |
187 } | 186 } |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 // there could be a WebURLLoader instance behind the | 481 // there could be a WebURLLoader instance behind the |
483 // DocumentThreadableLoader instance. So, for safety, we chose to just | 482 // DocumentThreadableLoader instance. So, for safety, we chose to just |
484 // crash here. | 483 // crash here. |
485 RELEASE_ASSERT(ThreadState::current()); | 484 RELEASE_ASSERT(ThreadState::current()); |
486 | 485 |
487 m_observer->dispose(); | 486 m_observer->dispose(); |
488 m_observer = nullptr; | 487 m_observer = nullptr; |
489 } | 488 } |
490 | 489 |
491 } // namespace blink | 490 } // namespace blink |
OLD | NEW |