1 #ifndef IPFS_PREFERENCES_H_INCLUDED
2 #define IPFS_PREFERENCES_H_INCLUDED 1
6 #include <base/memory/raw_ptr.h>
7 #include <base/values.h>
9 #include <ipfs_client/ctx/gateway_config.h>
13 class PrefRegistrySimple;
17 COMPONENT_EXPORT(IPFS)
void RegisterPreferences(PrefRegistrySimple*);
18 bool DnsFallbackPref(PrefService
const*);
24 base::Value::Dict last_;
25 base::Value::Dict curr_;
26 std::size_t changes = 0;
27 std::size_t update_thresh = 1;
30 std::size_t delta()
const;
35 unsigned GetGatewayRate(std::string_view)
override;
36 void SetGatewayRate(std::string_view,
unsigned)
override;
37 std::optional<GatewaySpec>
GetGateway(std::size_t index)
const override;
38 void AddGateway(std::string_view,
unsigned)
override;
40 unsigned RoutingApiDiscoveryDefaultRate()
const override;
41 bool RoutingApiDiscoveryOfUnencryptedGateways()
const override;
42 int GetTypeAffinity(std::string_view url_prefix,
43 gw::GatewayRequestType)
const override;
44 void SetTypeAffinity(std::string_view url_prefix,
45 gw::GatewayRequestType,
Definition: preferences.h:22
std::optional< GatewaySpec > GetGateway(std::size_t index) const override
Definition: gateway_config.h:13