File: pref_names.h

package info (click to toggle)
chromium-browser 70.0.3538.110-1~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,619,476 kB
  • sloc: cpp: 13,024,755; ansic: 1,349,823; python: 916,672; xml: 314,489; java: 280,047; asm: 276,936; perl: 75,771; objc: 66,634; sh: 45,860; cs: 28,354; php: 11,064; makefile: 10,911; yacc: 9,109; tcl: 8,403; ruby: 4,065; lex: 1,779; pascal: 1,411; lisp: 1,055; awk: 41; jsp: 39; sed: 17; sql: 3
file content (127 lines) | stat: -rw-r--r-- 6,187 bytes parent folder | download
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Copyright 2016 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_NTP_SNIPPETS_PREF_NAMES_H_
#define COMPONENTS_NTP_SNIPPETS_PREF_NAMES_H_

namespace ntp_snippets {
namespace prefs {

// If set to false, remote suggestions are completely disabled. This is set by
// an enterprise policy.
extern const char kEnableSnippets[];

// Whether the list of NTP snippets is visible in UI. This is set to false when
// the user toggles the list off.
extern const char kArticlesListVisible[];

// The pref name under which remote suggestion categories (including their ID
// and title) are stored.
extern const char kRemoteSuggestionCategories[];

// The pref name for the last time when a background fetch was attempted.
extern const char kSnippetLastFetchAttemptTime[];

// The pref name for the last time when a background fetch was successfull.
extern const char kSnippetLastSuccessfulFetchTime[];

// Pref names for minimal intervals between two successive background fetches.
//
// The prefs store *currently applied* minimal intervals. For each trigger type
// there are two intervals stored in prefs:
//  - "Wifi" for situations with Wifi / unmetered network connectivity, and
//  - "Fallback" for situations with only non-Wifi / metered network.
// We check "meteredness" of the current network only on platforms that support
// that, notably Android; we use WiFi as the proxy of being unmetered elsewhere.
//
// Intervals for trigger type 1: wake-up of the persistent scheduler.
extern const char kSnippetPersistentFetchingIntervalWifi[];
extern const char kSnippetPersistentFetchingIntervalFallback[];
// Intervals for trigger type 2: browser started-up (both cold and warm start).
extern const char kSnippetStartupFetchingIntervalWifi[];
extern const char kSnippetStartupFetchingIntervalFallback[];
// Intervals for trigger type 3: suggestions shown to the user.
extern const char kSnippetShownFetchingIntervalWifi[];
extern const char kSnippetShownFetchingIntervalFallback[];

// The pref name for today's count of RemoteSuggestionsFetcher requests, so far.
extern const char kSnippetFetcherRequestCount[];
// The pref name for today's count of RemoteSuggestionsFetcher interactive
// requests.
extern const char kSnippetFetcherInteractiveRequestCount[];
// The pref name for the current day for the counter of RemoteSuggestionsFetcher
// requests.
extern const char kSnippetFetcherRequestsDay[];

// The pref name for today's count of requests for article thumbnails, so far.
extern const char kSnippetThumbnailsRequestCount[];
// The pref name for today's count of interactive requests for article
// thumbnails, so far.
extern const char kSnippetThumbnailsInteractiveRequestCount[];
// The pref name for the current day for the counter of requests for article
// thumbnails.
extern const char kSnippetThumbnailsRequestsDay[];

// The pref name for the time of the last successful background fetch.
extern const char kLastSuccessfulBackgroundFetchTime[];

extern const char kDismissedAssetDownloadSuggestions[];
extern const char kDismissedForeignSessionsSuggestions[];
extern const char kDismissedOfflinePageDownloadSuggestions[];

extern const char kDismissedCategories[];

// The pref name for the discounted average number of browsing sessions per hour
// that involve opening a new NTP.
extern const char kUserClassifierAverageNTPOpenedPerHour[];
// The pref name for the discounted average number of browsing sessions per hour
// that involve opening showing the content suggestions.
extern const char kUserClassifierAverageSuggestionsShownPerHour[];
// The pref name for the discounted average number of browsing sessions per hour
// that involve using content suggestions (i.e. opening one or clicking on the
// "More" button).
extern const char kUserClassifierAverageSuggestionsUsedPerHour[];

// The pref name for the last time a new NTP was opened.
extern const char kUserClassifierLastTimeToOpenNTP[];
// The pref name for the last time content suggestions were shown to the user.
extern const char kUserClassifierLastTimeToShowSuggestions[];
// The pref name for the last time content suggestions were used by the user.
extern const char kUserClassifierLastTimeToUseSuggestions[];

// The pref name for the current order of categories and their clicks.
extern const char kClickBasedCategoryRankerOrderWithClicks[];
// The pref name for the time when last click decay has happened.
extern const char kClickBasedCategoryRankerLastDecayTime[];

// The folllowing prefs hold the data used when subscribing for content
// suggestions via GCM push updates. They are stored in pref such that in case
// of change (e.g. the token renders invalid), re-subscription is required.
// They are stored in prefs for persisting them across Chrome restarts.
///////////////////////////////////////////////////////////////////////////////
// The pref name for the subscription token used when subscription for
// breaking news push updates.
extern const char kBreakingNewsSubscriptionDataToken[];
// The pref name for whether the subscription is authenticated or not.
extern const char kBreakingNewsSubscriptionDataIsAuthenticated[];
//////////////////////// End of breaking news subscription-related prefs.

// The pref name for the subscription token received from the gcm server. As
// recommended by the GCM team, it is cached in pref for faster bookkeeping to
// see if subscription exists. This is pref holds the valid token even if
// different from the one used for subscription. When they are different, Chrome
// unsubscribes the old token from the content suggestions server, subscribe
// with the new one and update kBreakingNewsSubscriptionDataToken.
extern const char kBreakingNewsGCMSubscriptionTokenCache[];

// When the last GCM token validation was.
extern const char kBreakingNewsGCMLastTokenValidationTime[];

// When the last forced subscription to content suggestions service was.
extern const char kBreakingNewsGCMLastForcedSubscriptionTime[];

}  // namespace prefs
}  // namespace ntp_snippets

#endif  // COMPONENTS_NTP_SNIPPETS_PREF_NAMES_H_