• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // 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 NET_DISK_CACHE_BACKEND_EXPERIMENT_H_
6 #define NET_DISK_CACHE_BACKEND_EXPERIMENT_H_
7 
8 #include "build/build_config.h"
9 #include "net/base/net_export.h"
10 
11 namespace disk_cache {
12 
13 // True if the current platform already uses Simple disk cache backend by
14 // default.
IsSimpleBackendEnabledByDefaultPlatform()15 constexpr bool IsSimpleBackendEnabledByDefaultPlatform() {
16   return BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) ||
17          BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC);
18 }
19 
20 // True if assigned to any of disk cache backend experiment groups.
21 NET_EXPORT bool InBackendExperiment();
22 
23 // True if assigned to the "simple" disk cache backend group.
24 NET_EXPORT bool InSimpleBackendExperimentGroup();
25 
26 // True if assigned to the "blockfile" disk cache backend group.
27 NET_EXPORT bool InBlockfileBackendExperimentGroup();
28 
29 }  // namespace disk_cache
30 
31 #endif  // NET_DISK_CACHE_BACKEND_EXPERIMENT_H_
32