Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/WebKit/Source/web/AssociatedURLLoader.cpp

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Fix lint error: ASSERT -> DCHECK Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 DCHECK(m_client); 142 DCHECK(m_client);
143 } 143 }
144 144
145 void AssociatedURLLoader::ClientAdapter::willFollowRedirect(ResourceRequest& new Request, const ResourceResponse& redirectResponse) 145 void AssociatedURLLoader::ClientAdapter::willFollowRedirect(ResourceRequest& new Request, const ResourceResponse& redirectResponse)
146 { 146 {
147 if (!m_client) 147 if (!m_client)
148 return; 148 return;
149 149
150 WrappedResourceRequest wrappedNewRequest(newRequest); 150 WrappedResourceRequest wrappedNewRequest(newRequest);
151 WrappedResourceResponse wrappedRedirectResponse(redirectResponse); 151 WrappedResourceResponse wrappedRedirectResponse(redirectResponse);
152 m_client->willFollowRedirect(m_loader, wrappedNewRequest, wrappedRedirectRes ponse); 152 // FIXME: Set encodedDataLength
Kunihiko Sakamoto 2016/07/01 10:12:35 I believe TODO(someone) is now preferred over FIXM
Adam Rice 2016/07/04 02:44:18 Done.
153 m_client->willFollowRedirect(m_loader, wrappedNewRequest, wrappedRedirectRes ponse, 0);
153 } 154 }
154 155
155 void AssociatedURLLoader::ClientAdapter::didSendData(unsigned long long bytesSen t, unsigned long long totalBytesToBeSent) 156 void AssociatedURLLoader::ClientAdapter::didSendData(unsigned long long bytesSen t, unsigned long long totalBytesToBeSent)
156 { 157 {
157 if (!m_client) 158 if (!m_client)
158 return; 159 return;
159 160
160 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent); 161 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent);
161 } 162 }
162 163
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 m_client->didDownloadData(m_loader, dataLength, -1); 202 m_client->didDownloadData(m_loader, dataLength, -1);
202 } 203 }
203 204
204 void AssociatedURLLoader::ClientAdapter::didReceiveData(const char* data, unsign ed dataLength) 205 void AssociatedURLLoader::ClientAdapter::didReceiveData(const char* data, unsign ed dataLength)
205 { 206 {
206 if (!m_client) 207 if (!m_client)
207 return; 208 return;
208 209
209 CHECK_LE(dataLength, static_cast<unsigned>(std::numeric_limits<int>::max())) ; 210 CHECK_LE(dataLength, static_cast<unsigned>(std::numeric_limits<int>::max())) ;
210 211
211 m_client->didReceiveData(m_loader, data, dataLength, -1); 212 m_client->didReceiveData(m_loader, data, dataLength, -1, dataLength);
212 } 213 }
213 214
214 void AssociatedURLLoader::ClientAdapter::didReceiveCachedMetadata(const char* da ta, int dataLength) 215 void AssociatedURLLoader::ClientAdapter::didReceiveCachedMetadata(const char* da ta, int dataLength)
215 { 216 {
216 if (!m_client) 217 if (!m_client)
217 return; 218 return;
218 219
219 m_client->didReceiveCachedMetadata(m_loader, data, dataLength); 220 m_client->didReceiveCachedMetadata(m_loader, data, dataLength);
220 } 221 }
221 222
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 // there could be a WebURLLoader instance behind the 452 // there could be a WebURLLoader instance behind the
452 // DocumentThreadableLoader instance. So, for safety, we chose to just 453 // DocumentThreadableLoader instance. So, for safety, we chose to just
453 // crash here. 454 // crash here.
454 RELEASE_ASSERT(ThreadState::current()); 455 RELEASE_ASSERT(ThreadState::current());
455 456
456 m_observer->dispose(); 457 m_observer->dispose();
457 m_observer = nullptr; 458 m_observer = nullptr;
458 } 459 }
459 460
460 } // namespace blink 461 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698