Index: components/metrics/call_stack_profile_metrics_provider_unittest.cc |
diff --git a/components/metrics/call_stack_profile_metrics_provider_unittest.cc b/components/metrics/call_stack_profile_metrics_provider_unittest.cc |
index 395ef8f053a7fd46d4a7659c1a84038cc216c5bc..a974b2d39770b1a4a98a2c4d08ad2b14e8599ded 100644 |
--- a/components/metrics/call_stack_profile_metrics_provider_unittest.cc |
+++ b/components/metrics/call_stack_profile_metrics_provider_unittest.cc |
@@ -4,6 +4,7 @@ |
#include "components/metrics/call_stack_profile_metrics_provider.h" |
+#include "base/metrics/call_stack_profile_params.h" |
#include "base/metrics/field_trial.h" |
#include "base/profiler/stack_sampling_profiler.h" |
#include "base/run_loop.h" |
@@ -21,7 +22,7 @@ using Sample = StackSamplingProfiler::Sample; |
namespace metrics { |
-using Params = CallStackProfileMetricsProvider::Params; |
+using Params = base::CallStackProfileParams; |
// This test fixture enables the field trial that |
// CallStackProfileMetricsProvider depends on to report profiles. |
@@ -204,9 +205,7 @@ TEST_F(CallStackProfileMetricsProviderTest, MultipleProfiles) { |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingEnabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- profiles); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), profiles); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -311,9 +310,8 @@ TEST_F(CallStackProfileMetricsProviderTest, RepeatedStacksUnordered) { |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingEnabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), |
+ std::vector<Profile>(1, profile)); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -390,9 +388,8 @@ TEST_F(CallStackProfileMetricsProviderTest, RepeatedStacksOrdered) { |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingEnabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, true), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, true), |
+ std::vector<Profile>(1, profile)); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -442,9 +439,8 @@ TEST_F(CallStackProfileMetricsProviderTest, UnknownModule) { |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingEnabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), |
+ std::vector<Profile>(1, profile)); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -479,9 +475,8 @@ TEST_F(CallStackProfileMetricsProviderTest, ProfilesProvidedOnlyOnce) { |
profile.sampling_period = base::TimeDelta::FromMilliseconds(i); |
provider.OnRecordingEnabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), |
+ std::vector<Profile>(1, profile)); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -506,9 +501,8 @@ TEST_F(CallStackProfileMetricsProviderTest, |
profile.profile_duration = base::TimeDelta::FromMilliseconds(100); |
profile.sampling_period = base::TimeDelta::FromMilliseconds(10); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), |
+ std::vector<Profile>(1, profile)); |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingEnabled(); |
@@ -530,9 +524,8 @@ TEST_F(CallStackProfileMetricsProviderTest, ProfilesNotProvidedWhileDisabled) { |
CallStackProfileMetricsProvider provider; |
provider.OnRecordingDisabled(); |
- AppendProfiles( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false), |
- std::vector<Profile>(1, profile)); |
+ AppendProfiles(Params(Params::PROCESS_STARTUP, false), |
+ std::vector<Profile>(1, profile)); |
ChromeUserMetricsExtension uma_proto; |
provider.ProvideGeneralMetrics(&uma_proto); |
@@ -554,7 +547,7 @@ TEST_F(CallStackProfileMetricsProviderTest, |
provider.OnRecordingEnabled(); |
base::StackSamplingProfiler::CompletedCallback callback = |
CallStackProfileMetricsProvider::GetProfilerCallback( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false)); |
+ Params(Params::PROCESS_STARTUP, false)); |
provider.OnRecordingDisabled(); |
callback.Run(std::vector<Profile>(1, profile)); |
@@ -579,7 +572,7 @@ TEST_F(CallStackProfileMetricsProviderTest, |
provider.OnRecordingEnabled(); |
base::StackSamplingProfiler::CompletedCallback callback = |
CallStackProfileMetricsProvider::GetProfilerCallback( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false)); |
+ Params(Params::PROCESS_STARTUP, false)); |
provider.OnRecordingDisabled(); |
provider.OnRecordingEnabled(); |
@@ -605,7 +598,7 @@ TEST_F(CallStackProfileMetricsProviderTest, |
provider.OnRecordingDisabled(); |
base::StackSamplingProfiler::CompletedCallback callback = |
CallStackProfileMetricsProvider::GetProfilerCallback( |
- Params(CallStackProfileMetricsProvider::PROCESS_STARTUP, false)); |
+ Params(Params::PROCESS_STARTUP, false)); |
provider.OnRecordingEnabled(); |
callback.Run(std::vector<Profile>(1, profile)); |