Chromium Code Reviews| Index: chrome/common/stack_sampling_configuration.cc |
| diff --git a/chrome/browser/stack_sampling_configuration.cc b/chrome/common/stack_sampling_configuration.cc |
| similarity index 93% |
| rename from chrome/browser/stack_sampling_configuration.cc |
| rename to chrome/common/stack_sampling_configuration.cc |
| index 925b9596c37f01f1087e1894b987c03f7e44e709..02e5b01156ca50f982e1faae4b721b006bd53b68 100644 |
| --- a/chrome/browser/stack_sampling_configuration.cc |
| +++ b/chrome/common/stack_sampling_configuration.cc |
| @@ -2,10 +2,9 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/browser/stack_sampling_configuration.h" |
| +#include "chrome/common/stack_sampling_configuration.h" |
| #include "base/rand_util.h" |
| -#include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| #include "chrome/common/channel_info.h" |
| #include "components/version_info/version_info.h" |
| @@ -76,7 +75,8 @@ bool StackSamplingConfiguration::IsProfilerEnabled() const { |
| configuration_ != PROFILE_CONTROL); |
| } |
| -void StackSamplingConfiguration::RegisterSyntheticFieldTrial() const { |
| +void StackSamplingConfiguration::RegisterSyntheticFieldTrial( |
| + const RegisterSyntheticFieldTrialFunction& register_field_trial) const { |
|
sky
2016/09/28 20:34:14
How come you need a callback here? Could this inst
Mike Wittman
2016/09/28 21:51:27
The callback is not strictly necessary, but it all
|
| if (!IsProfilerSupported()) |
| return; |
| @@ -107,9 +107,7 @@ void StackSamplingConfiguration::RegisterSyntheticFieldTrial() const { |
| break; |
| } |
| - ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( |
| - "SyntheticStackProfilingConfiguration", |
| - group); |
| + register_field_trial.Run("SyntheticStackProfilingConfiguration", group); |
| } |
| // static |