OLD | NEW |
(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 "components/metrics/single_value_histograms_provider.h" |
| 6 |
| 7 #include "components/metrics/single_value_counts_histogram.h" |
| 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 9 |
| 10 namespace metrics { |
| 11 |
| 12 // static |
| 13 void SingleValueHistogramsProvider::Create( |
| 14 mojom::SingleValueHistogramsProviderRequest request) { |
| 15 // TODO(dalecurtis): Is strong binding what we want here? Seems like we'd |
| 16 // prefer this is lazily created and available forever more to RPHI. |
| 17 mojo::MakeStrongBinding(base::MakeUnique<SingleValueHistogramsProvider>(), |
| 18 std::move(request)); |
| 19 } |
| 20 |
| 21 SingleValueHistogramsProvider::SingleValueHistogramsProvider() { |
| 22 LOG(ERROR) << __func__; |
| 23 } |
| 24 |
| 25 SingleValueHistogramsProvider::~SingleValueHistogramsProvider() { |
| 26 LOG(ERROR) << __func__; |
| 27 } |
| 28 |
| 29 void SingleValueHistogramsProvider::AcquireSingleValueCountsHistogram( |
| 30 const std::string& name, |
| 31 base::HistogramBase::Sample min, |
| 32 base::HistogramBase::Sample max, |
| 33 uint32_t bucket_count, |
| 34 mojom::SingleValueCountsHistogramRequest request) { |
| 35 mojo::MakeStrongBinding(base::MakeUnique<SingleValueCountsHistogram>( |
| 36 name, min, max, bucket_count), |
| 37 std::move(request)); |
| 38 } |
| 39 |
| 40 } // namespace metrics |
OLD | NEW |