blob: 472dcbc5e60b5d4060d05abc8ea5d77b824b9b6b (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
// Copyright (c) 2012 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 CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_FIELD_TRIAL_H_
#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_FIELD_TRIAL_H_
#include <string>
#include "base/basictypes.h"
// This class manages the Autocomplete field trials.
class AutocompleteFieldTrial {
public:
// Creates the field trial groups.
// *** MUST NOT BE CALLED MORE THAN ONCE. ***
static void Activate();
// ---------------------------------------------------------
// For the inline History Quick Provider field trial.
// Returns whether the user is in any field trial group for this
// field trial. False indicates that the field trial wasn't
// successfully created for some reason.
static bool InDisallowInlineHQPFieldTrial();
// Returns whether the user should get the experiment setup or
// the default setup for this field trial. The experiment
// group prohibits inlining suggestions.
static bool InDisallowInlineHQPFieldTrialExperimentGroup();
// ---------------------------------------------------------
// For the suggest field trial.
// Returns whether the user is in any field trial group for this
// field trial. False indicates that the field trial wasn't
// successfully created for some reason.
static bool InSuggestFieldTrial();
// Gets the group name to use when sending a suggest query to Google.
// Should only be called if InSuggestFieldTrial().
static std::string GetSuggestGroupName();
// Gets the group name (as a number) to use when sending a suggest query
// to Google. Should only be called if InSuggestFieldTrial().
static int GetSuggestGroupNameAsNumber();
// Gets the maximum number of groups in the suggest field trial.
// (Useful for telling UMA_HISTOGRAM_ENUMERATION the number of buckets
// to create.)
static int GetSuggestNumberOfGroups();
// ---------------------------------------------------------
// For the History Quick Provider new scoring field trial.
// Returns whether the user is in any field trial group for this
// field trial. False indicates that the field trial wasn't
// successfully created for some reason.
static bool InHQPNewScoringFieldTrial();
// Returns whether the user should get the experimental setup or
// the default setup for this field trial. The experiment
// group uses "new scoring" (a complex multiplicative calculation
// that, among other differences from "old scoring", uses word
// break information).
static bool InHQPNewScoringFieldTrialExperimentGroup();
// ---------------------------------------------------------
// For the HistoryURL provider disable culling redirects field trial.
// Returns whether the user is in any group for this field trial.
// (Should always be true unless initialization went wrong.)
static bool InHUPCullRedirectsFieldTrial();
// Returns whether we should disable culling of redirects in
// HistoryURL provider.
static bool InHUPCullRedirectsFieldTrialExperimentGroup();
// ---------------------------------------------------------
// For the HistoryURL provider disable creating a shorter match
// field trial.
// Returns whether the user is in any group for this field trial.
// (Should always be true unless initialization went wrong.)
static bool InHUPCreateShorterMatchFieldTrial();
// Returns whether we should disable creating a shorter match in
// HistoryURL provider.
static bool InHUPCreateShorterMatchFieldTrialExperimentGroup();
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AutocompleteFieldTrial);
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_FIELD_TRIAL_H_
|