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

Unified Diff: webkit/glue/weburlloader_impl.cc

Issue 6771043: Enabled actual transfer size in chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment added Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/plugins/npapi/webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/weburlloader_impl.cc
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 2c0659a91ba1ea0026f8e9a7db61921c24bdd1dc..c3d79beaab58e73d73f39dcf9b9597504a9b21ff 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -157,6 +157,7 @@ bool GetInfoFromDataURL(const GURL& url,
info->charset.swap(charset);
info->security_info.clear();
info->content_length = -1;
+ info->raw_data_length = 0;
info->load_timing.base_time = Time::Now();
return true;
@@ -295,7 +296,9 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>,
GURL* new_first_party_for_cookies);
virtual void OnReceivedResponse(const ResourceResponseInfo& info);
virtual void OnDownloadedData(int len);
- virtual void OnReceivedData(const char* data, int len);
+ virtual void OnReceivedData(const char* data,
+ int data_length,
+ int raw_data_length);
virtual void OnReceivedCachedMetadata(const char* data, int len);
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
@@ -591,23 +594,25 @@ void WebURLLoaderImpl::Context::OnDownloadedData(int len) {
client_->didDownloadData(loader_, len);
}
-void WebURLLoaderImpl::Context::OnReceivedData(const char* data, int len) {
+void WebURLLoaderImpl::Context::OnReceivedData(const char* data,
+ int data_length,
+ int raw_data_length) {
if (!client_)
return;
// Temporary logging, see site_isolation_metrics.h/cc.
- SiteIsolationMetrics::SniffCrossOriginHTML(response_url_, data, len);
+ SiteIsolationMetrics::SniffCrossOriginHTML(response_url_, data, data_length);
if (ftp_listing_delegate_.get()) {
// The FTP listing delegate will make the appropriate calls to
// client_->didReceiveData and client_->didReceiveResponse.
- ftp_listing_delegate_->OnReceivedData(data, len);
+ ftp_listing_delegate_->OnReceivedData(data, data_length);
} else if (multipart_delegate_.get()) {
// The multipart delegate will make the appropriate calls to
// client_->didReceiveData and client_->didReceiveResponse.
- multipart_delegate_->OnReceivedData(data, len);
+ multipart_delegate_->OnReceivedData(data, data_length, raw_data_length);
} else {
- client_->didReceiveData(loader_, data, len, -1);
+ client_->didReceiveData(loader_, data, data_length, raw_data_length);
}
}
@@ -694,7 +699,7 @@ void WebURLLoaderImpl::Context::HandleDataURL() {
if (GetInfoFromDataURL(request_.url(), &info, &data, &status)) {
OnReceivedResponse(info);
if (!data.empty())
- OnReceivedData(data.data(), data.size());
+ OnReceivedData(data.data(), data.size(), 0);
}
OnCompletedRequest(status, info.security_info, base::Time::Now());
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | webkit/plugins/npapi/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698