-
bnc authored
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 Review URL: https://codereview.chromium.org/516443002 Cr-Commit-Position: refs/heads/master@{#292613}
c1a560b6