Chromium Code Reviews| Index: components/cronet/android/cronet_url_request_context_adapter.cc |
| diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc |
| index 24d31843dd2fa46019249d9dc0c1edf329f4e2f8..7d0bf0f5f2e7eb86a411b0f72bcf07c3f524077e 100644 |
| --- a/components/cronet/android/cronet_url_request_context_adapter.cc |
| +++ b/components/cronet/android/cronet_url_request_context_adapter.cc |
| @@ -205,15 +205,15 @@ class NetworkQualitiesPrefDelegateImpl |
| } |
| std::unique_ptr<base::DictionaryValue> GetDictionaryValue() override { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| - // TODO(tbansal): Add logic to read prefs if the embedder has enabled cached |
| - // estimates. |
| - return base::WrapUnique(new base::DictionaryValue()); |
| + UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.ReadCount", 1, 2); |
| + return pref_service_->GetDictionary(kNetworkQualities)->CreateDeepCopy(); |
|
xunjieli
2017/02/07 21:05:59
Does |pref_service_| return empty DictionaryValue
tbansal1
2017/02/09 17:36:26
Yes, it will return an empty map.
Prefs are read
|
| } |
| private: |
| // Schedules the writing of the lossy prefs. |
| void SchedulePendingLossyWrites() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| + UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.WriteCount", 1, 2); |
| pref_service_->SchedulePendingLossyWrites(); |
| lossy_prefs_writing_task_posted_ = false; |
| } |