New issue
Advanced search Search tips

Issue 904465 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 19
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

NQE prefs are empty when read at the time of startup

Project Member Reported by tbansal@chromium.org, Nov 12

Issue description

NQE (Network Quality Estimator) prefs manager reads prefs at the time of startup. Current data is showing that the prefs manager is unable to read any prefs at that time:
http://shortn/_vvz7mQIEJ2

This might be happening because network_context initializes pref service asynchronously:
https://cs.chromium.org/chromium/src/services/network/network_context.cc?rcl=b751b6f31037e75eae9d85de7f12a06d149974b6&l=1629

The fix may be that NQE should read prefs after pref service has been actually initialized.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faaa93468c13d66d86450fab0fd63b9a918f772e

commit faaa93468c13d66d86450fab0fd63b9a918f772e
Author: Tarun Bansal <tbansal@chromium.org>
Date: Thu Nov 15 22:20:24 2018

NQE: Read cache at startup only after pref service has been initialized

Currently, the pref delegate in network quality estimator (NQE) reads
network quality prefs right after startup. However, the underlying pref
service factory is initialized asynchronously by the network_context
(see the linked bug). This results in pref delegate read at startup
returning empty value, irrespective of the actual prefs.

This CL fixes the bug by changing pref delegate to read the pref only
after the pref service has been initialized. This ensures that
when the prefs are read, they actually return what's stored on the
disk, instead of empty values.

Change-Id: I9791c673c0300d6d896f2d8e556c97f01f7e1f52
Bug:  904465 
Reviewed-on: https://chromium-review.googlesource.com/c/1333127
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608544}
[add] https://crrev.com/faaa93468c13d66d86450fab0fd63b9a918f772e/chrome/browser/net/network_quality_estimator_prefs_browsertest.cc
[modify] https://crrev.com/faaa93468c13d66d86450fab0fd63b9a918f772e/chrome/test/BUILD.gn
[modify] https://crrev.com/faaa93468c13d66d86450fab0fd63b9a918f772e/services/network/network_qualities_pref_delegate.cc
[modify] https://crrev.com/faaa93468c13d66d86450fab0fd63b9a918f772e/services/network/network_qualities_pref_delegate.h

Labels: -Pri-2 Pri-1
Status: Fixed (was: Started)
Metrics seem to be recovering: https://screenshot.googleplex.com/Cj5YUj7yRde. Marking as fixed.

Sign in to add a comment