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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Rebase Created 4 years, 2 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698