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

Unified Diff: chrome/common/stack_sampling_configuration.cc

Issue 2375563002: Stack sampling profiler: move configuration to chrome/common (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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 {
if (!IsProfilerSupported())
return;
@@ -107,9 +107,7 @@ void StackSamplingConfiguration::RegisterSyntheticFieldTrial() const {
break;
}
- ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
- "SyntheticStackProfilingConfiguration",
- group);
+ register_field_trial.Run("SyntheticStackProfilingConfiguration", group);
}
// static
« chrome/common/stack_sampling_configuration.h ('K') | « chrome/common/stack_sampling_configuration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698