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

Side by Side Diff: base/metrics/histogram_snapshot_manager.cc

Issue 10703037: Move StatisticsRecorder out of histogram.cc/h for further refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_unittest.cc » ('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 "base/metrics/histogram_snapshot_manager.h" 5 #include "base/metrics/histogram_snapshot_manager.h"
6 6
7 #include "base/metrics/statistics_recorder.h"
8
7 using base::Histogram; 9 using base::Histogram;
8 using base::StatisticsRecorder; 10 using base::StatisticsRecorder;
9 11
10 namespace base { 12 namespace base {
11 13
12 HistogramSnapshotManager::HistogramSnapshotManager( 14 HistogramSnapshotManager::HistogramSnapshotManager(
13 HistogramFlattener* histogram_flattener) 15 HistogramFlattener* histogram_flattener)
14 : histogram_flattener_(histogram_flattener) { 16 : histogram_flattener_(histogram_flattener) {
15 DCHECK(histogram_flattener_); 17 DCHECK(histogram_flattener_);
16 } 18 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 97 }
96 98
97 // Snapshot now contains only a delta to what we've already_logged. 99 // Snapshot now contains only a delta to what we've already_logged.
98 if (snapshot.redundant_count() > 0) { 100 if (snapshot.redundant_count() > 0) {
99 histogram_flattener_->RecordDelta(histogram, snapshot); 101 histogram_flattener_->RecordDelta(histogram, snapshot);
100 // Add new data into our running total. 102 // Add new data into our running total.
101 already_logged->Add(snapshot); 103 already_logged->Add(snapshot);
102 } 104 }
103 } 105 }
104 } // namespace base 106 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698