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

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

Issue 1997153002: libchrome: Several upstreamable fixes from libchrome Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed feedback Created 4 years, 7 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
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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698