Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Issue 516443002: Remove NETWORK_PREDICTION_UNSET. (Closed)

Created:
6 years, 3 months ago by Bence
Modified:
6 years, 3 months ago
Reviewers:
gavinp, mmenke
CC:
chromium-reviews, tburkard+watch_chromium.org, gavinp+prer_chromium.org, cbentzel+watch_chromium.org, dominich+watch_chromium.org, davidben+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -74 lines) Patch
M chrome/browser/net/prediction_options.h View 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/net/prediction_options.cc View 1 2 3 4 5 4 chunks +18 lines, -41 lines 0 comments Download
M chrome/browser/prefetch/prefetch.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 2 chunks +2 lines, -18 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Bence
bnc@chromium.org changed reviewers: + gavinp@chromium.org, mattm@chromium.org
6 years, 3 months ago (2014-08-27 15:25:33 UTC) #1
Bence
gavinp: Please review changes in prefetch. mattm: Please review changes in net, prerender.
6 years, 3 months ago (2014-08-27 15:25:33 UTC) #2
Bence
Trybots are happy now, PTAL.
6 years, 3 months ago (2014-08-27 18:45:37 UTC) #3
mattm
I might not be the best person to review prerender stuff. Did you mean mmenke?
6 years, 3 months ago (2014-08-27 19:30:10 UTC) #4
Bence
On 2014/08/27 19:30:10, mattm wrote: > I might not be the best person to review ...
6 years, 3 months ago (2014-08-27 19:36:25 UTC) #5
Bence
bnc@chromium.org changed reviewers: + mmenke@chromium.org - mattm@chromium.org
6 years, 3 months ago (2014-08-27 19:36:34 UTC) #6
gavinp
prefetch.cc LGTM. The rest LGTM as well, although I think the thread checking comment is ...
6 years, 3 months ago (2014-08-28 13:34:11 UTC) #7
Bence
mmenke: PTAL. https://codereview.chromium.org/516443002/diff/20001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/516443002/diff/20001/chrome/browser/prerender/prerender_manager.cc#newcode1862 chrome/browser/prerender/prerender_manager.cc:1862: DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); You are right. It is stated ...
6 years, 3 months ago (2014-08-28 14:11:55 UTC) #8
mmenke
https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc#newcode40 chrome/browser/net/prediction_options.cc:40: namespace chrome_browser_net { Suggest moving this up to include ...
6 years, 3 months ago (2014-08-28 14:34:49 UTC) #9
Bence
mmenke: PTAL. https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc#newcode40 chrome/browser/net/prediction_options.cc:40: namespace chrome_browser_net { CanPrefetchAndPrerender and CanPreresolveAndPreconnect are ...
6 years, 3 months ago (2014-08-28 14:58:20 UTC) #10
mmenke
https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc#newcode40 chrome/browser/net/prediction_options.cc:40: namespace chrome_browser_net { On 2014/08/28 14:58:20, Bence wrote: > ...
6 years, 3 months ago (2014-08-28 15:12:16 UTC) #11
Bence
PTAL. https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/40001/chrome/browser/net/prediction_options.cc#newcode40 chrome/browser/net/prediction_options.cc:40: namespace chrome_browser_net { On 2014/08/28 15:12:16, mmenke wrote: ...
6 years, 3 months ago (2014-08-28 15:46:17 UTC) #12
mmenke
LGTM https://codereview.chromium.org/516443002/diff/80001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/80001/chrome/browser/net/prediction_options.cc#newcode27 chrome/browser/net/prediction_options.cc:27: default: Optional: Maybe DCHECK_EQ(NETWORK_PREDICTION_WIFI_ONLY, network_prediction_options);
6 years, 3 months ago (2014-08-28 17:03:38 UTC) #13
Bence
The CQ bit was checked by bnc@chromium.org
6 years, 3 months ago (2014-08-29 12:03:21 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bnc@chromium.org/516443002/100001
6 years, 3 months ago (2014-08-29 12:04:13 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 01300a78c7e9c1c35144c6fb762aa86862a250d3
6 years, 3 months ago (2014-08-29 12:54:29 UTC) #16
Bence
mmenke: Thanks for your help. https://codereview.chromium.org/516443002/diff/80001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/516443002/diff/80001/chrome/browser/net/prediction_options.cc#newcode27 chrome/browser/net/prediction_options.cc:27: default: On 2014/08/28 17:03:37, ...
6 years, 3 months ago (2014-08-29 13:22:43 UTC) #17
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:07:54 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c1a560b6e1f7548bc952467d01e3bed610a4e280
Cr-Commit-Position: refs/heads/master@{#292613}

Powered by Google App Engine
This is Rietveld 408576698