DescriptionRemove NETWORK_PREDICTION_UNSET.
Since PrefService provides a consistent and convenient way to check if a user
value has ever been saved for a preference, there is no need for
NETWORK_PREDICTION_UNSET in enum chrome_browser_net::NetworkPredictionOptions.
The default value is NETWORK_PREDICTION_WIFI_ONLY, this is reported by
PrefService if there is no user setting, policy, etc.
Note that since MigrateNetworkPredictionUserPrefs was introduced in
https://codereview.chromium.org/421653006/diff/160002/chrome/browser/net/prediction_options.cc,
there is no need to check the old preference NetworkPredictionEnabled in
CanPrefetchAndPrerender* or CanPreresolveAndPreconnect*.
Also note that Chromium at no point did save NETWORK_PREDICTION_UNSET to disk,
it only used to be provided as a default option. This guarantees that this CL
does not introduce functional change.
TODO:
* Remove network_prediction_enabled from profile_io_data.
* Remove PrerenderCondition classes.
As this CL will also fix UI bug https://crbug.com/404794, I prefer to land it
first, and deal with the other two clean-up items on a separate CL.
BUG=406583
Committed: https://crrev.com/c1a560b6e1f7548bc952467d01e3bed610a4e280
Cr-Commit-Position: refs/heads/master@{#292613}
Patch Set 1 #Patch Set 2 : Reinstate PrerenderManager::SetEnabled() mechanism. #
Total comments: 3
Patch Set 3 : Revert thread DCHECK change in IsEnabled. #
Total comments: 8
Patch Set 4 : Nit. #Patch Set 5 : Nest namespaces. #
Total comments: 2
Patch Set 6 : Add DCHECK. #
Messages
Total messages: 18 (0 generated)
|