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

Side by Side Diff: content/browser/download/download_stats.cc

Issue 74523002: [Downloads] Update origin info after each response. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better descriptions. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/download/download_stats.h ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_stats.h" 5 #include "content/browser/download/download_stats.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/metrics/sparse_histogram.h" 8 #include "base/metrics/sparse_histogram.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "content/browser/download/download_resource_handler.h" 10 #include "content/browser/download/download_resource_handler.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 UMA_HISTOGRAM_COUNTS_100("Download.DiskBandwidthUsedPercentage", 604 UMA_HISTOGRAM_COUNTS_100("Download.DiskBandwidthUsedPercentage",
605 disk_write_time_ms * 100 / elapsed_time_ms); 605 disk_write_time_ms * 100 / elapsed_time_ms);
606 } 606 }
607 607
608 void RecordSavePackageEvent(SavePackageEvent event) { 608 void RecordSavePackageEvent(SavePackageEvent event) {
609 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", 609 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage",
610 event, 610 event,
611 SAVE_PACKAGE_LAST_ENTRY); 611 SAVE_PACKAGE_LAST_ENTRY);
612 } 612 }
613 613
614 void RecordOriginStateOnResumption(bool is_partial,
615 int state) {
616 if (is_partial)
617 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnPartialResumption", state,
618 ORIGIN_STATE_ON_RESUMPTION_MAX);
619 else
620 UMA_HISTOGRAM_ENUMERATION("Download.OriginStateOnFullResumption", state,
621 ORIGIN_STATE_ON_RESUMPTION_MAX);
622 }
623
614 } // namespace content 624 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_stats.h ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698