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

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2540023003: Dispatch encoded_data_length separately in content/child (Closed)
Patch Set: fix Created 4 years 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) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 rights reserved.
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 resource->resourceRequest().requestContext(), resource); 1254 resource->resourceRequest().requestContext(), resource);
1255 resource->responseReceived(response, std::move(handle)); 1255 resource->responseReceived(response, std::move(handle));
1256 if (resource->loader() && response.httpStatusCode() >= 400 && 1256 if (resource->loader() && response.httpStatusCode() >= 400 &&
1257 !resource->shouldIgnoreHTTPStatusCodeErrors()) { 1257 !resource->shouldIgnoreHTTPStatusCodeErrors()) {
1258 resource->loader()->didFail(ResourceError::cancelledError(response.url())); 1258 resource->loader()->didFail(ResourceError::cancelledError(response.url()));
1259 } 1259 }
1260 } 1260 }
1261 1261
1262 void ResourceFetcher::didReceiveData(const Resource* resource, 1262 void ResourceFetcher::didReceiveData(const Resource* resource,
1263 const char* data, 1263 const char* data,
1264 int dataLength, 1264 int dataLength) {
1265 int encodedDataLength) {
1266 context().dispatchDidReceiveData(resource->identifier(), data, dataLength); 1265 context().dispatchDidReceiveData(resource->identifier(), data, dataLength);
1266 }
1267
1268 void ResourceFetcher::didReceiveTransferSizeUpdate(const Resource* resource,
1269 int transferSizeDiff) {
1267 context().dispatchDidReceiveEncodedData(resource->identifier(), 1270 context().dispatchDidReceiveEncodedData(resource->identifier(),
1268 encodedDataLength); 1271 transferSizeDiff);
1269 } 1272 }
1270 1273
1271 void ResourceFetcher::didDownloadData(const Resource* resource, 1274 void ResourceFetcher::didDownloadData(const Resource* resource,
1272 int dataLength, 1275 int dataLength,
1273 int encodedDataLength) { 1276 int encodedDataLength) {
1274 context().dispatchDidDownloadData(resource->identifier(), dataLength, 1277 context().dispatchDidDownloadData(resource->identifier(), dataLength,
1275 encodedDataLength); 1278 encodedDataLength);
1276 } 1279 }
1277 1280
1278 void ResourceFetcher::moveResourceLoaderToNonBlocking(ResourceLoader* loader) { 1281 void ResourceFetcher::moveResourceLoaderToNonBlocking(ResourceLoader* loader) {
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 visitor->trace(m_context); 1644 visitor->trace(m_context);
1642 visitor->trace(m_archive); 1645 visitor->trace(m_archive);
1643 visitor->trace(m_loaders); 1646 visitor->trace(m_loaders);
1644 visitor->trace(m_nonBlockingLoaders); 1647 visitor->trace(m_nonBlockingLoaders);
1645 visitor->trace(m_documentResources); 1648 visitor->trace(m_documentResources);
1646 visitor->trace(m_preloads); 1649 visitor->trace(m_preloads);
1647 visitor->trace(m_resourceTimingInfoMap); 1650 visitor->trace(m_resourceTimingInfoMap);
1648 } 1651 }
1649 1652
1650 } // namespace blink 1653 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698