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

Unified Diff: chrome/browser/metrics/metrics_log_serializer.cc

Issue 10541085: When persisting UMA logs to disk, cap log size based on both the XML and protocol buffer logs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: max rather than sum Created 8 years, 6 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 | « no previous file | chrome/common/metrics/metrics_log_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_log_serializer.cc
diff --git a/chrome/browser/metrics/metrics_log_serializer.cc b/chrome/browser/metrics/metrics_log_serializer.cc
index 69d434b7427e2d9b6d7cc2c1bd2312261e4d0b81..95d5271154575a2bd0dccd39995a50e62b8656bb 100644
--- a/chrome/browser/metrics/metrics_log_serializer.cc
+++ b/chrome/browser/metrics/metrics_log_serializer.cc
@@ -155,9 +155,7 @@ void MetricsLogSerializer::WriteLogsToPrefList(
size_t bytes_used = 0;
for (std::vector<MetricsLogManager::SerializedLog>::const_reverse_iterator
it = local_list.rbegin(); it != local_list.rend(); ++it) {
- // TODO(isherman): Always uses XML length so both formats of a given log
- // will be saved; switch to proto once that's the primary format.
- size_t log_size = it->xml.length();
+ size_t log_size = it->length();
if (bytes_used >= byte_limit &&
(local_list.size() - start) >= list_length_limit)
break;
« no previous file with comments | « no previous file | chrome/common/metrics/metrics_log_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698