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

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

Issue 1776973002: Revert of Collect information about failing histogram factory calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_persistence.h" 5 #include "base/metrics/histogram_persistence.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 NOTREACHED(); 281 NOTREACHED();
282 return nullptr; 282 return nullptr;
283 } 283 }
284 284
285 // After the main "counts" array is a second array using for storing what 285 // After the main "counts" array is a second array using for storing what
286 // was previously logged. This is used to calculate the "delta" during 286 // was previously logged. This is used to calculate the "delta" during
287 // snapshot operations. 287 // snapshot operations.
288 HistogramBase::AtomicCount* logged_data = 288 HistogramBase::AtomicCount* logged_data =
289 counts_data + histogram_data.bucket_count; 289 counts_data + histogram_data.bucket_count;
290 290
291 CHECK_LT(0, histogram_data.minimum);
292 CHECK_LT(0, histogram_data.maximum);
293 std::string name(histogram_data_ptr->name); 291 std::string name(histogram_data_ptr->name);
294 HistogramBase* histogram = nullptr; 292 HistogramBase* histogram = nullptr;
295 switch (histogram_data.histogram_type) { 293 switch (histogram_data.histogram_type) {
296 case HISTOGRAM: 294 case HISTOGRAM:
297 histogram = Histogram::PersistentGet( 295 histogram = Histogram::PersistentGet(
298 name, 296 name,
299 histogram_data.minimum, 297 histogram_data.minimum,
300 histogram_data.maximum, 298 histogram_data.maximum,
301 ranges, 299 ranges,
302 counts_data, 300 counts_data,
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 while (true) { 507 while (true) {
510 HistogramBase* histogram = GetNextPersistentHistogram(g_allocator, &iter); 508 HistogramBase* histogram = GetNextPersistentHistogram(g_allocator, &iter);
511 if (!histogram) 509 if (!histogram)
512 break; 510 break;
513 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram); 511 StatisticsRecorder::RegisterOrDeleteDuplicate(histogram);
514 } 512 }
515 } 513 }
516 } 514 }
517 515
518 } // namespace base 516 } // 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