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

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

Issue 2519843002: Update ResourceResponse::encodedDataLength when response is completed (Closed)
Patch Set: Update ResourceResponse::encodedDataLength when response is completed 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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 ArchiveResource* ResourceFetcher::createArchive(Resource* resource) { 1115 ArchiveResource* ResourceFetcher::createArchive(Resource* resource) {
1116 // Only the top-frame can load MHTML. 1116 // Only the top-frame can load MHTML.
1117 if (!context().isMainFrame()) 1117 if (!context().isMainFrame())
1118 return nullptr; 1118 return nullptr;
1119 m_archive = MHTMLArchive::create(resource->url(), resource->resourceBuffer()); 1119 m_archive = MHTMLArchive::create(resource->url(), resource->resourceBuffer());
1120 return m_archive ? m_archive->mainResource() : nullptr; 1120 return m_archive ? m_archive->mainResource() : nullptr;
1121 } 1121 }
1122 1122
1123 void ResourceFetcher::didFinishLoading(Resource* resource, 1123 void ResourceFetcher::didFinishLoading(Resource* resource,
1124 double finishTime, 1124 double finishTime,
1125 int64_t encodedDataLength,
1126 DidFinishLoadingReason finishReason) { 1125 DidFinishLoadingReason finishReason) {
1127 network_instrumentation::endResourceLoad( 1126 network_instrumentation::endResourceLoad(
1128 resource->identifier(), network_instrumentation::RequestOutcome::Success); 1127 resource->identifier(), network_instrumentation::RequestOutcome::Success);
1129 DCHECK(resource); 1128 DCHECK(resource);
1129 const int64_t encodedDataLength = resource->response().encodedDataLength();
1130 1130
1131 // When loading a multipart resource, make the loader non-block when finishing 1131 // When loading a multipart resource, make the loader non-block when finishing
1132 // loading the first part. 1132 // loading the first part.
1133 if (finishReason == DidFinishFirstPartInMultipart) 1133 if (finishReason == DidFinishFirstPartInMultipart)
1134 moveResourceLoaderToNonBlocking(resource->loader()); 1134 moveResourceLoaderToNonBlocking(resource->loader());
1135 else 1135 else
1136 removeResourceLoader(resource->loader()); 1136 removeResourceLoader(resource->loader());
1137 DCHECK(!m_loaders.contains(resource->loader())); 1137 DCHECK(!m_loaders.contains(resource->loader()));
1138 DCHECK(finishReason == DidFinishFirstPartInMultipart || 1138 DCHECK(finishReason == DidFinishFirstPartInMultipart ||
1139 !m_nonBlockingLoaders.contains(resource->loader())); 1139 !m_nonBlockingLoaders.contains(resource->loader()));
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 visitor->trace(m_context); 1641 visitor->trace(m_context);
1642 visitor->trace(m_archive); 1642 visitor->trace(m_archive);
1643 visitor->trace(m_loaders); 1643 visitor->trace(m_loaders);
1644 visitor->trace(m_nonBlockingLoaders); 1644 visitor->trace(m_nonBlockingLoaders);
1645 visitor->trace(m_documentResources); 1645 visitor->trace(m_documentResources);
1646 visitor->trace(m_preloads); 1646 visitor->trace(m_preloads);
1647 visitor->trace(m_resourceTimingInfoMap); 1647 visitor->trace(m_resourceTimingInfoMap);
1648 } 1648 }
1649 1649
1650 } // namespace blink 1650 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.h ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698