diff --git a/components/cronet/cronet_prefs_manager.cc b/components/cronet/cronet_prefs_manager.cc index 1ef557869e0a6..f00feb0b50114 100644 --- a/components/cronet/cronet_prefs_manager.cc +++ b/components/cronet/cronet_prefs_manager.cc @@ -116,7 +116,7 @@ class PrefServiceAdapter : public net::HttpServerProperties::PrefDelegate { // PrefDelegate implementation. const base::Value* GetServerProperties() const override { - return pref_service_->Get(path_); + return &pref_service_->GetValue(path_); } void SetServerProperties(const base::Value& value, @@ -183,9 +183,7 @@ class NetworkQualitiesPrefDelegateImpl base::Value::Dict GetDictionaryValue() override { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.ReadCount", 1, 2); - return pref_service_->GetDictionary(kNetworkQualitiesPref) - ->GetDict() - .Clone(); + return pref_service_->GetValueDict(kNetworkQualitiesPref).Clone(); } private: diff --git a/components/cronet/host_cache_persistence_manager.cc b/components/cronet/host_cache_persistence_manager.cc index a0ed6bdd06d71..0e5d81ea6d72d 100644 --- a/components/cronet/host_cache_persistence_manager.cc +++ b/components/cronet/host_cache_persistence_manager.cc @@ -56,8 +56,7 @@ void HostCachePersistenceManager::ReadFromDisk() { return; net_log_.BeginEvent(net::NetLogEventType::HOST_CACHE_PREF_READ); - const base::Value::List& pref_value = - pref_service_->GetList(pref_name_)->GetList(); + const base::Value::List& pref_value = pref_service_->GetValueList(pref_name_); bool success = cache_->RestoreFromListValue(pref_value); net_log_.AddEntryWithBoolParams(net::NetLogEventType::HOST_CACHE_PREF_READ, net::NetLogEventPhase::END, "success",