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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Nit + rebase + build fix Created 4 years, 3 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 DCHECK(m_client); 143 DCHECK(m_client);
144 } 144 }
145 145
146 void AssociatedURLLoader::ClientAdapter::willFollowRedirect(ResourceRequest& new Request, const ResourceResponse& redirectResponse) 146 void AssociatedURLLoader::ClientAdapter::willFollowRedirect(ResourceRequest& new Request, const ResourceResponse& redirectResponse)
147 { 147 {
148 if (!m_client) 148 if (!m_client)
149 return; 149 return;
150 150
151 WrappedResourceRequest wrappedNewRequest(newRequest); 151 WrappedResourceRequest wrappedNewRequest(newRequest);
152 WrappedResourceResponse wrappedRedirectResponse(redirectResponse); 152 WrappedResourceResponse wrappedRedirectResponse(redirectResponse);
153 // TODO(ricea): Do we need to set encodedDataLength here? 153 m_client->willFollowRedirect(m_loader, wrappedNewRequest, wrappedRedirectRes ponse);
154 m_client->willFollowRedirect(m_loader, wrappedNewRequest, wrappedRedirectRes ponse, 0);
155 } 154 }
156 155
157 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)
158 { 157 {
159 if (!m_client) 158 if (!m_client)
160 return; 159 return;
161 160
162 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent); 161 m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent);
163 } 162 }
164 163
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // there could be a WebURLLoader instance behind the 452 // there could be a WebURLLoader instance behind the
454 // DocumentThreadableLoader instance. So, for safety, we chose to just 453 // DocumentThreadableLoader instance. So, for safety, we chose to just
455 // crash here. 454 // crash here.
456 RELEASE_ASSERT(ThreadState::current()); 455 RELEASE_ASSERT(ThreadState::current());
457 456
458 m_observer->dispose(); 457 m_observer->dispose();
459 m_observer = nullptr; 458 m_observer = nullptr;
460 } 459 }
461 460
462 } // namespace blink 461 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698