summaryrefslogtreecommitdiffstats
path: root/components/variations/processed_study.h
blob: 64b290c8106d1aa8af0f8733459a3dabe84d4381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2013 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_PROCESSED_STUDY_H_
#define COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_

#include "base/metrics/field_trial.h"

namespace chrome_variations {

class Study;

// Wrapper over Study with extra information computed during pre-processing,
// such as whether the study is expired and its total probability.
struct ProcessedStudy {
  ProcessedStudy(const Study* study,
                 base::FieldTrial::Probability total_probability,
                 bool is_expired);
  ~ProcessedStudy();

  // Corresponding Study object. Weak reference.
  const Study* study;

  // Computed total group probability for the study.
  base::FieldTrial::Probability total_probability;

  // Whether the study is expired.
  bool is_expired;
};

}  // namespace chrome_variations

#endif  // COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_