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

Unified Diff: chrome/common/stack_sampling_configuration.h

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
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/stack_sampling_configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/stack_sampling_configuration.h
diff --git a/chrome/browser/stack_sampling_configuration.h b/chrome/common/stack_sampling_configuration.h
similarity index 70%
rename from chrome/browser/stack_sampling_configuration.h
rename to chrome/common/stack_sampling_configuration.h
index 9a52b037b7e4769c7d4980a9603465f009b1992f..2c7ab50d04235c300f2acda18e687757192ae352 100644
--- a/chrome/browser/stack_sampling_configuration.h
+++ b/chrome/common/stack_sampling_configuration.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_STACK_SAMPLING_CONFIGURATION_H_
-#define CHROME_BROWSER_STACK_SAMPLING_CONFIGURATION_H_
+#ifndef CHROME_COMMON_STACK_SAMPLING_CONFIGURATION_H_
+#define CHROME_COMMON_STACK_SAMPLING_CONFIGURATION_H_
#include "base/macros.h"
#include "base/profiler/stack_sampling_profiler.h"
@@ -13,6 +13,11 @@
// friended by ChromeMetricsServiceAccessor.
class StackSamplingConfiguration {
public:
+ // This callback indirection is required to avoid a DEPS on
+ // chrome/browser/metrics.
+ using RegisterSyntheticFieldTrialFunction = base::Callback<bool(
+ const std::string& trial_name,
+ const std::string& group_name)>;
Ilya Sherman 2016/09/28 00:48:27 nit: Please leave a blank newline after this line.
Mike Wittman 2016/09/28 19:31:11 Done.
StackSamplingConfiguration();
// Get the stack sampling params to use for this session.
@@ -22,7 +27,8 @@ class StackSamplingConfiguration {
bool IsProfilerEnabled() const;
// Register the chosen configuration as a synthetic field trial.
- void RegisterSyntheticFieldTrial() const;
+ void RegisterSyntheticFieldTrial(
+ const RegisterSyntheticFieldTrialFunction& register_field_trial) const;
private:
enum ProfileConfiguration {
@@ -41,4 +47,4 @@ class StackSamplingConfiguration {
DISALLOW_COPY_AND_ASSIGN(StackSamplingConfiguration);
};
-#endif // CHROME_BROWSER_STACK_SAMPLING_CONFIGURATION_H_
+#endif // CHROME_COMMON_STACK_SAMPLING_CONFIGURATION_H_
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/stack_sampling_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698