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

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

Issue 2382503002: Cleanup histograms from message loop, as well as kHexRangePrintingFlag. (Closed)
Patch Set: make flag comment nicer Created 4 years, 2 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
« no previous file with comments | « base/metrics/histogram_base.cc ('k') | chrome/app/chrome_main_delegate.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/sparse_histogram.h" 5 #include "base/metrics/sparse_histogram.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/metrics_hashes.h" 10 #include "base/metrics/metrics_hashes.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 it->Next(); 275 it->Next();
276 } 276 }
277 } 277 }
278 278
279 void SparseHistogram::WriteAsciiHeader(const Count total_count, 279 void SparseHistogram::WriteAsciiHeader(const Count total_count,
280 std::string* output) const { 280 std::string* output) const {
281 StringAppendF(output, 281 StringAppendF(output,
282 "Histogram: %s recorded %d samples", 282 "Histogram: %s recorded %d samples",
283 histogram_name().c_str(), 283 histogram_name().c_str(),
284 total_count); 284 total_count);
285 if (flags() & ~kHexRangePrintingFlag) 285 if (flags())
286 StringAppendF(output, " (flags = 0x%x)", flags() & ~kHexRangePrintingFlag); 286 StringAppendF(output, " (flags = 0x%x)", flags());
287 } 287 }
288 288
289 } // namespace base 289 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram_base.cc ('k') | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698