summaryrefslogtreecommitdiff
path: root/chromium/components/optimization_guide/optimization_guide_prefs.h
blob: 2a81f6fdf4586684a56359844c31becf06391dae (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
// Copyright 2019 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_OPTIMIZATION_GUIDE_OPTIMIZATION_GUIDE_PREFS_H_
#define COMPONENTS_OPTIMIZATION_GUIDE_OPTIMIZATION_GUIDE_PREFS_H_

#include "base/macros.h"

class PrefRegistrySimple;

namespace optimization_guide {
namespace prefs {

extern const char kHintsFetcherLastFetchAttempt[];
extern const char kHintsFetcherDataSaverTopHostBlacklist[];
extern const char kHintsFetcherDataSaverTopHostBlacklistState[];
extern const char kTimeBlacklistLastInitialized[];
extern const char
    kHintsFetcherDataSaverTopHostBlacklistMinimumEngagementScore[];
extern const char kHintsFetcherHostsSuccessfullyFetched[];
extern const char kPendingHintsProcessingVersion[];

// State of |HintsFetcherTopHostsBlacklist|. The blacklist begins in
// kNotInitialized and transitions to kInitialized after
// InitializeHintsFetcherTopHostBlack() is called. When the blacklist no longer
// contains any hosts, the state transitions to kEmpty.
enum class HintsFetcherTopHostBlacklistState {
  kNotInitialized = 0,
  kInitialized = 1,
  kEmpty = 2,
  kMaxValue = kEmpty,
};

// Registers the optimization guide's prefs.
void RegisterProfilePrefs(PrefRegistrySimple* registry);

}  // namespace prefs
}  // namespace optimization_guide

#endif  // COMPONENTS_OPTIMIZATION_GUIDE_OPTIMIZATION_GUIDE_PREFS_H_