blob: 74a3f7289b9f70b69d556412b1cc5861aecef002 [file] [log] [blame]
Kevin McNee842eb0a2024-04-11 20:14:161// Copyright 2024 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CONTENT_BROWSER_PRELOADING_PRELOADING_CONFIDENCE_H_
6#define CONTENT_BROWSER_PRELOADING_PRELOADING_CONFIDENCE_H_
7
8#include "base/check_op.h"
9#include "base/types/strong_alias.h"
10
11namespace content {
12
13// The confidence percentage of a predictor's preloading prediction. The range
14// is [0, 100].
15class PreloadingConfidence
16 : public base::StrongAlias<class PreloadingConfidenceTag, int> {
17 public:
18 constexpr explicit PreloadingConfidence(int confidence)
19 : base::StrongAlias<class PreloadingConfidenceTag, int>(confidence) {
20 CHECK_GE(confidence, 0);
21 CHECK_LE(confidence, 100);
22 }
23};
24
25} // namespace content
26
27#endif // CONTENT_BROWSER_PRELOADING_PRELOADING_CONFIDENCE_H_