OLD | NEW |
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/statistics_recorder.h" | 5 #include "base/metrics/statistics_recorder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 callbacks_deleter.reset(callbacks_); | 496 callbacks_deleter.reset(callbacks_); |
497 ranges_deleter.reset(ranges_); | 497 ranges_deleter.reset(ranges_); |
498 histograms_ = NULL; | 498 histograms_ = NULL; |
499 callbacks_ = NULL; | 499 callbacks_ = NULL; |
500 ranges_ = NULL; | 500 ranges_ = NULL; |
501 } | 501 } |
502 // We are going to leak the histograms and the ranges. | 502 // We are going to leak the histograms and the ranges. |
503 } | 503 } |
504 | 504 |
505 // static | 505 // static |
506 void StatisticsRecorder::DumpHistogramsToVlog(void* instance) { | 506 void StatisticsRecorder::DumpHistogramsToVlog(void* /*instance*/) { |
507 std::string output; | 507 std::string output; |
508 StatisticsRecorder::WriteGraph(std::string(), &output); | 508 StatisticsRecorder::WriteGraph(std::string(), &output); |
509 VLOG(1) << output; | 509 VLOG(1) << output; |
510 } | 510 } |
511 | 511 |
512 | 512 |
513 // static | 513 // static |
514 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; | 514 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; |
515 // static | 515 // static |
516 StatisticsRecorder::CallbackMap* StatisticsRecorder::callbacks_ = NULL; | 516 StatisticsRecorder::CallbackMap* StatisticsRecorder::callbacks_ = NULL; |
517 // static | 517 // static |
518 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL; | 518 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL; |
519 // static | 519 // static |
520 base::Lock* StatisticsRecorder::lock_ = NULL; | 520 base::Lock* StatisticsRecorder::lock_ = NULL; |
521 | 521 |
522 } // namespace base | 522 } // namespace base |
OLD | NEW |