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

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

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | base/observer_list_threadsafe.h » ('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/statistics_recorder.h" 5 #include "base/metrics/statistics_recorder.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/debug/leak_annotations.h" 8 #include "base/debug/leak_annotations.h"
9 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 } // namespace 24 } // namespace
25 25
26 namespace base { 26 namespace base {
27 27
28 // static 28 // static
29 void StatisticsRecorder::Initialize() { 29 void StatisticsRecorder::Initialize() {
30 // Ensure that an instance of the StatisticsRecorder object is created. 30 // Ensure that an instance of the StatisticsRecorder object is created.
31 g_statistics_recorder_.Get(); 31 g_statistics_recorder_.Get();
32 } 32 }
33 33
34
35 // static 34 // static
36 bool StatisticsRecorder::IsActive() { 35 bool StatisticsRecorder::IsActive() {
37 if (lock_ == NULL) 36 if (lock_ == NULL)
38 return false; 37 return false;
39 base::AutoLock auto_lock(*lock_); 38 base::AutoLock auto_lock(*lock_);
40 return NULL != histograms_; 39 return NULL != histograms_;
41 } 40 }
42 41
43 // static 42 // static
44 HistogramBase* StatisticsRecorder::RegisterOrDeleteDuplicate( 43 HistogramBase* StatisticsRecorder::RegisterOrDeleteDuplicate(
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 313
315 314
316 // static 315 // static
317 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL; 316 StatisticsRecorder::HistogramMap* StatisticsRecorder::histograms_ = NULL;
318 // static 317 // static
319 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL; 318 StatisticsRecorder::RangesMap* StatisticsRecorder::ranges_ = NULL;
320 // static 319 // static
321 base::Lock* StatisticsRecorder::lock_ = NULL; 320 base::Lock* StatisticsRecorder::lock_ = NULL;
322 321
323 } // namespace base 322 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | base/observer_list_threadsafe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698