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

Issue 1712943002: [Android] Simplify "network predictions" preference to a boolean value. (Closed)

Created:
4 years, 10 months ago by newt (away)
Modified:
4 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, wifiprefetch-reviews_google.com, Bence
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Simplify "network predictions" preference to a boolean value. This changes the network predictions preference on Android from a tri-state (always, only on wifi, never) to a two-state (on, off). The privacy settings screen now shows a simple checkbox to control this preference. "Always" and "only on wifi" are effectively merged into the new "on" state, which has the same behavior as the old "only on wifi" state: prefetching and prerendering are allowed only on wifi, while DNS preresolving and TCP preconnect can happen on all connection types. Under the hood, the "always" and "only on wifi" states still exist temporarily, but are treated identically. This change doesn't affect other platforms, which already use "always" and "only on wifi" interchangably and show a simple checkbox in the UI. BUG=585297 Committed: https://crrev.com/1f354ca0573b81547e0921f2a015915a7ccc3dbd Cr-Commit-Position: refs/heads/master@{#377716}

Patch Set 1 #

Total comments: 8

Patch Set 2 : yusufo's comment #

Patch Set 3 : rebased #

Patch Set 4 : updated TODO in prediction_options.h #

Total comments: 2

Patch Set 5 : updated tests to test new behavior #

Patch Set 6 : Dan's comment #

Total comments: 4

Patch Set 7 : added bug link; rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -324 lines) Patch
M chrome/android/java/res/values/arrays.xml View 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/android/java/res/xml/privacy_preferences.xml View 1 2 3 4 5 6 1 chunk +2 lines, -13 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/precache/PrecacheLauncher.java View 1 chunk +1 line, -1 line 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/preferences/NetworkPredictionOptions.java View 1 chunk +0 lines, -77 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java View 1 2 4 chunks +21 lines, -21 lines 0 comments Download
D chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/NetworkPredictionPreference.java View 1 chunk +0 lines, -42 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java View 1 2 3 4 5 6 7 chunks +10 lines, -42 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManager.java View 4 chunks +12 lines, -13 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 2 chunks +5 lines, -28 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java View 1 2 3 4 5 6 3 chunks +10 lines, -13 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxTest.java View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 4 4 chunks +13 lines, -15 lines 0 comments Download
M chrome/browser/net/prediction_options.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/net/prediction_options.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M chrome/browser/predictors/resource_prefetch_common_unittest.cc View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/prefetch/prefetch_browsertest.cc View 1 2 3 4 2 chunks +2 lines, -13 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java View 1 2 3 4 5 6 5 chunks +6 lines, -15 lines 0 comments Download

Messages

Total messages: 42 (14 generated)
newt (away)
mmenke: Could you take a look at prediction_options.[cc|h] and maybe pref_service_bridge.cc? https://codereview.chromium.org/1712943002/diff/1/chrome/browser/net/prediction_options.h File chrome/browser/net/prediction_options.h (right): ...
4 years, 10 months ago (2016-02-19 02:57:23 UTC) #2
newt (away)
donnd: PTAL at ContextualSearchPolicy.java https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java (right): https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java#newcode101 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java:101: if (!PrefServiceBridge.getInstance().getNetworkPredictionEnabled()) { donnd: Is ...
4 years, 10 months ago (2016-02-19 03:02:37 UTC) #4
newt (away)
yusuf: could you take a look at everything?
4 years, 10 months ago (2016-02-19 03:04:11 UTC) #6
mmenke
https://codereview.chromium.org/1712943002/diff/1/chrome/browser/net/prediction_options.h File chrome/browser/net/prediction_options.h (right): https://codereview.chromium.org/1712943002/diff/1/chrome/browser/net/prediction_options.h#newcode21 chrome/browser/net/prediction_options.h:21: // TODO(newt): collapse ALWAYS and WIFI_ONLY into a single ...
4 years, 10 months ago (2016-02-19 15:48:40 UTC) #7
Yusuf
lgtm with a nit. Thanks newt! https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java File chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java (right): https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java#newcode529 chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java:529: public boolean obsoleteNetworkPredictionOptionsHasUserSetting() ...
4 years, 10 months ago (2016-02-19 18:28:28 UTC) #8
donnd
Adding Pedro in case I'm missing a broader context for this change/review (I'm OOO today ...
4 years, 10 months ago (2016-02-19 19:11:04 UTC) #10
newt (away)
+dan for ChromeActivityTestCaseBase.java https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java File chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java (right): https://codereview.chromium.org/1712943002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java#newcode101 chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java:101: if (!PrefServiceBridge.getInstance().getNetworkPredictionEnabled()) { On 2016/02/19 19:11:04, ...
4 years, 10 months ago (2016-02-19 21:41:54 UTC) #12
pedro (no code reviews)
lgtm lgtm for ContextualSearchPolicy.java
4 years, 10 months ago (2016-02-19 23:37:36 UTC) #13
newt (away)
Matt, does chrome/browser/net look good to you?
4 years, 10 months ago (2016-02-20 00:19:13 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1712943002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1712943002/60001
4 years, 10 months ago (2016-02-20 00:22:07 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/128074)
4 years, 10 months ago (2016-02-20 01:11:46 UTC) #18
mmenke
browser/net LGTM...Does look like you have some test failures, though.
4 years, 10 months ago (2016-02-22 16:40:53 UTC) #19
gone
That singular file you asked me to look at lgtm https://chromiumcodereview.appspot.com/1712943002/diff/60001/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java File chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java (right): https://chromiumcodereview.appspot.com/1712943002/diff/60001/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java#newcode206 ...
4 years, 10 months ago (2016-02-22 19:37:56 UTC) #20
newt (away)
On 2016/02/22 16:40:53, mmenke wrote: > browser/net LGTM...Does look like you have some test failures, ...
4 years, 10 months ago (2016-02-22 19:38:32 UTC) #21
newt (away)
pasko: PTAL at chrome/browser/predictors/resource_prefetch_common_unittest.c gavinp: PTAL at chrome/browser/prefetch/prefetch_browsertest.cc https://codereview.chromium.org/1712943002/diff/60001/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java File chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java (right): https://codereview.chromium.org/1712943002/diff/60001/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java#newcode206 chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java:206: * ...
4 years, 10 months ago (2016-02-22 19:43:35 UTC) #23
newt (away)
https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/predictors/resource_prefetch_common_unittest.cc File chrome/browser/predictors/resource_prefetch_common_unittest.cc (left): https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/predictors/resource_prefetch_common_unittest.cc#oldcode309 chrome/browser/predictors/resource_prefetch_common_unittest.cc:309: SetPreference(NetworkPredictionOptions::NETWORK_PREDICTION_ALWAYS); The "ALWAYS" state is being merged into the ...
4 years, 10 months ago (2016-02-22 19:45:38 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1712943002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1712943002/100001
4 years, 10 months ago (2016-02-23 05:35:49 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-23 06:18:19 UTC) #28
newt (away)
gavinp and pasko: friendly ping?
4 years, 10 months ago (2016-02-24 17:42:21 UTC) #29
gavinp
On 2016/02/24 17:42:21, newt wrote: > gavinp and pasko: friendly ping? newt: I'm on it. ...
4 years, 10 months ago (2016-02-25 16:55:24 UTC) #30
gavinp
lgtm
4 years, 10 months ago (2016-02-25 16:57:06 UTC) #31
newt (away)
zhenw: Could you take a look at the small change in resource_prefetch_common_unittest.cc? Seems like pasko ...
4 years, 10 months ago (2016-02-25 17:13:58 UTC) #33
pasko
chrome/browser/predictors lgtm sorry for delay, took some time figuring out what our plan is.
4 years, 10 months ago (2016-02-25 21:43:04 UTC) #34
pasko
https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/net/prediction_options.h File chrome/browser/net/prediction_options.h (right): https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/net/prediction_options.h#newcode21 chrome/browser/net/prediction_options.h:21: // TODO(newt): collapse ALWAYS and WIFI_ONLY into a single ...
4 years, 10 months ago (2016-02-25 21:43:20 UTC) #35
newt (away)
Thanks all for reviewing! https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/net/prediction_options.h File chrome/browser/net/prediction_options.h (right): https://codereview.chromium.org/1712943002/diff/100001/chrome/browser/net/prediction_options.h#newcode21 chrome/browser/net/prediction_options.h:21: // TODO(newt): collapse ALWAYS and ...
4 years, 10 months ago (2016-02-25 21:51:24 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1712943002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1712943002/120001
4 years, 10 months ago (2016-02-25 21:59:53 UTC) #39
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-02-25 23:53:33 UTC) #40
commit-bot: I haz the power
4 years, 10 months ago (2016-02-25 23:54:36 UTC) #42
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/1f354ca0573b81547e0921f2a015915a7ccc3dbd
Cr-Commit-Position: refs/heads/master@{#377716}

Powered by Google App Engine
This is Rietveld 408576698