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

Unified Diff: components/variations/synthetic_trials.h

Issue 1530133005: Refactor VariationsHttpHeaderProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include to srt_fetcher_win.cc. Created 5 years 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: components/variations/synthetic_trials.h
diff --git a/components/variations/synthetic_trials.h b/components/variations/synthetic_trials.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5b4240334978e82afe6a6c7383aaf8772d1cec5
--- /dev/null
+++ b/components/variations/synthetic_trials.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_
+#define COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_
+
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/time/time.h"
+#include "components/variations/active_field_trials.h"
+
+namespace variations {
+
+// A Field Trial and its selected group, which represent a particular
+// Chrome configuration state. For example, the trial name could map to
+// a preference name, and the group name could map to a preference value.
+struct SyntheticTrialGroup {
+ public:
+ SyntheticTrialGroup(uint32_t trial, uint32_t group);
+ ~SyntheticTrialGroup();
+
+ ActiveGroupId id;
+ base::TimeTicks start_time;
+};
+
+// Interface class to observe changes to synthetic trials in MetricsService.
+class SyntheticTrialObserver {
+ public:
+ // Called when the list of synthetic field trial groups has changed.
+ virtual void OnSyntheticTrialsChanged(
+ const std::vector<SyntheticTrialGroup>& groups) = 0;
+
+ protected:
+ virtual ~SyntheticTrialObserver() {}
+};
+
+} // namespace variations
+
+#endif // COMPONENTS_VARIATIONS_SYNTHETIC_TRIALS_H_
« no previous file with comments | « components/variations/net/variations_http_headers_unittest.cc ('k') | components/variations/synthetic_trials.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698