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

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

Issue 2687583002: Add support for single sample metrics. (Closed)
Patch Set: Use thread local storage. Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/metrics/single_value_histograms.h"
6
7 namespace base {
8
9 static SingleValueHistogramsFactory* g_factory = nullptr;
10
11 // TODO(dalecurtis): What to do about tests that don't have a ChildThread? Now
12 // we'd need all run_all_unittests.cc to set this up, which is annoying...
Alexei Svitkine (slow) 2017/04/26 18:12:53 Can we have a default factor that creates instance
DaleCurtis 2017/04/29 00:30:35 Done; this also allows reuse of the default implem
13
14 // static
15 SingleValueHistogramsFactory* SingleValueHistogramsFactory::Get() {
16 return g_factory;
17 }
18
19 // static
20 void SingleValueHistogramsFactory::SetFactory(
21 SingleValueHistogramsFactory* factory) {
22 DCHECK(!g_factory);
23 g_factory = factory;
24 }
25
26 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698