blob: d2f6e1e5b9e114a5d41540ee9dea03ebcc44646f (
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
|
// Copyright 2018 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_SEARCH_NTP_FEATURES_H_
#define COMPONENTS_SEARCH_NTP_FEATURES_H_
#include "base/feature_list.h"
namespace base {
class Time;
} // namespace base
namespace ntp_features {
// The features should be documented alongside the definition of their values in
// the .cc file.
extern const base::Feature kConfirmSuggestionRemovals;
extern const base::Feature kDismissPromos;
extern const base::Feature kIframeOneGoogleBar;
extern const base::Feature kNtpRepeatableQueries;
extern const base::Feature kOneGoogleBarModalOverlays;
extern const base::Feature kRealboxMatchOmniboxTheme;
extern const base::Feature kRealboxUseGoogleGIcon;
extern const base::Feature kWebUI;
extern const base::Feature kWebUIThemeModeDoodles;
extern const base::Feature kModules;
extern const base::Feature kNtpRecipeTasksModule;
extern const base::Feature kNtpShoppingTasksModule;
extern const base::Feature kSearchSuggestChips;
extern const base::Feature kDisableSearchSuggestChips;
extern const base::Feature kNtpHandleMostVisitedNavigationExplicitly;
// Parameter name determining the age threshold in days for local history
// repeatable queries.
// The value of this parameter should be parsable as an unsigned integer.
extern const char kNtpRepeatableQueriesAgeThresholdDaysParam[];
// Parameter name determining the number of seconds until the recency component
// of the frecency score for local history repeatable queries decays to half.
// The value of this parameter should be parsable as an unsigned integer.
extern const char kNtpRepeatableQueriesRecencyHalfLifeSecondsParam[];
// Parameter name determining the factor by which the frequency component of the
// frecency score for local history repeatable queries is exponentiated.
// The value of this parameter should be parsable as a double.
extern const char kNtpRepeatableQueriesFrequencyExponentParam[];
// Parameter name determining the position, with respect to the MV tiles, in
// which the repeatable queries should be inserted.
extern const char kNtpRepeatableQueriesInsertPositionParam[];
// The available positions, with respect to the MV tiles, in which the
// repeatable queries can be inserted.
enum class RepeatableQueriesInsertPosition {
kStart = 0, // At the start of MV tiles.
kEnd, // At the end of MV tiles.
};
// Parameter determining the type of stateful data to request.
extern const char kNtpStatefulTasksModuleDataParam[];
// Returns the age threshold for local history repeatable queries.
base::Time GetLocalHistoryRepeatableQueriesAgeThreshold();
// Returns the number of seconds until the recency component of the frecency
// score for local history repeatable queries decays to half.
int GetLocalHistoryRepeatableQueriesRecencyHalfLifeSeconds();
// Returns the factor by which the frequency component of the frecency score for
// local history repeatable queries is exponentiated.
double GetLocalHistoryRepeatableQueriesFrequencyExponent();
// Returns the position, with respect to the MV tiles, in which the repeatable
// queries should be inserted.
RepeatableQueriesInsertPosition GetRepeatableQueriesInsertPosition();
} // namespace ntp_features
#endif // COMPONENTS_SEARCH_NTP_FEATURES_H_
|