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

Unified Diff: content/browser/download/download_resource_handler.cc

Issue 20609004: [Downloads] Some UMA for downloads resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « content/browser/download/download_resource_handler.h ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 2a02cf926dfc1f159e3d91b4f62c6e685ca3fef0..3b4844e6e68ee33651ffd4904ca71fc5a43dec0a 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -171,11 +171,10 @@ bool DownloadResourceHandler::OnResponseStarted(
const net::HttpResponseHeaders* headers = request_->response_headers();
if (headers) {
std::string last_modified_hdr;
- std::string etag;
if (headers->EnumerateHeader(NULL, "Last-Modified", &last_modified_hdr))
info->last_modified = last_modified_hdr;
- if (headers->EnumerateHeader(NULL, "ETag", &etag))
- info->etag = etag;
+ if (headers->EnumerateHeader(NULL, "ETag", &etag_))
+ info->etag = etag_;
int status = headers->response_code();
if (2 == status / 100 && status != net::HTTP_PARTIAL_CONTENT) {
@@ -373,7 +372,7 @@ bool DownloadResourceHandler::OnResponseCompleted(
}
}
- RecordAcceptsRanges(accept_ranges_, bytes_read_);
+ RecordAcceptsRanges(accept_ranges_, bytes_read_, etag_);
RecordNetworkBlockage(
base::TimeTicks::Now() - download_start_time_, total_pause_time_);
« no previous file with comments | « content/browser/download/download_resource_handler.h ('k') | content/browser/download/download_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698