blob: 499acd82723b61fc3d5b6e01af10c27ec2e79cf3 [file] [log] [blame]
Alexei Svitkinee726dd522018-03-09 04:41:031// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef COMPONENTS_VARIATIONS_VARIATIONS_CRASH_KEYS_H_
6#define COMPONENTS_VARIATIONS_VARIATIONS_CRASH_KEYS_H_
7
8#include <vector>
9
10namespace variations {
11
12struct SyntheticTrialGroup;
13
14// Initializes crash keys that report the current set of active FieldTrial
15// groups (aka variations) for crash reports. After initialization, an observer
16// will be registered on FieldTrialList that will keep the crash keys up-to-date
17// with newly-activated trials. Synthetic trials must be manually updated using
18// the API below.
19void InitCrashKeys();
20
21// Updates variations crash keys by replacing the list of synthetic trials with
22// the specified list. Does not affect non-synthetic trials.
23void UpdateCrashKeysWithSyntheticTrials(
24 const std::vector<SyntheticTrialGroup>& synthetic_trials);
25
26// Clears the internal instance, for testing.
27void ClearCrashKeysInstanceForTesting();
28
29} // namespace variations
30
31#endif // COMPONENTS_VARIATIONS_VARIATIONS_CRASH_KEYS_H_