summaryrefslogtreecommitdiffstats
path: root/content/browser/download/download_resource_handler.cc
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 23:02:26 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 23:02:26 +0000
commit11325a2b36895210fb3c2922e80cdec5e53cb715 (patch)
tree2f1d159eb47b77d2df6cdc4ce7ea1bbae693443c /content/browser/download/download_resource_handler.cc
parente8325ac9da150a03aef94f966da08eaf916378d1 (diff)
downloadchromium_src-11325a2b36895210fb3c2922e80cdec5e53cb715.zip
chromium_src-11325a2b36895210fb3c2922e80cdec5e53cb715.tar.gz
chromium_src-11325a2b36895210fb3c2922e80cdec5e53cb715.tar.bz2
[Downloads] Some UMA for downloads resumption.
* Count number of requests initiated due to resumption. * Count downloads that have a strong validator and supports range requests, since those are candidates for partial resumption. * Count downloads that are interrupted after the associated WebContents is destroyed. BUG=7648 Review URL: https://chromiumcodereview.appspot.com/20609004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214461 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/download/download_resource_handler.cc')
-rw-r--r--content/browser/download/download_resource_handler.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 2a02cf9..3b4844e 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_);