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

Issue 421653006: Update "Predict network actions" UI setting. (Closed)

Created:
6 years, 4 months ago by Bence
Modified:
6 years, 4 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, chromium-apps-reviews_chromium.org, arv+watch_chromium.org, asvitkine+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Update "Predict network actions" UI setting. * Update chrome://settings Privacy section to change int kNetworkPredictionOptions instead of bool kNetworkPredictionEnabled. * Introduce code to migrate user setting (and only user setting). * Per UI review, keep UI unchanged. * Note that policy handler for these two preferences has already landed, see https://crrev.com/431493003. BUG=334602 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288352

Patch Set 1 #

Total comments: 12

Patch Set 2 : Remove dropdown menu per UI review. #

Patch Set 3 : Rebase. #

Patch Set 4 : Update test cases and hack test. #

Total comments: 2

Patch Set 5 : Migrate only if HasUserSetting. #

Patch Set 6 : Remove unnecessary include. #

Patch Set 7 : Rebase. #

Total comments: 8

Patch Set 8 : Move and improve migration routine. #

Total comments: 10

Patch Set 9 : Use existing accessors in migration code. #

Patch Set 10 : Nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -5 lines) Patch
M chrome/browser/extensions/api/preference/preference_api.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/net/prediction_options.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/net/prediction_options.cc View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/options/browser_options.html View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 6 7 4 chunks +38 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 8 9 4 chunks +20 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Bence
PTAL at the following files. Thank you. Ilya: tools/metrics/actions/actions.xml Yoyo: chrome/browser/extensions/api/preference/preference_api.cc Steven: chrome/browser/{resources,ui}/*
6 years, 4 months ago (2014-07-30 02:54:08 UTC) #1
stevenjb
https://codereview.chromium.org/421653006/diff/1/chrome/browser/resources/options/browser_options.html File chrome/browser/resources/options/browser_options.html (right): https://codereview.chromium.org/421653006/diff/1/chrome/browser/resources/options/browser_options.html#newcode363 chrome/browser/resources/options/browser_options.html:363: </div --> Elim commented out code before committing. https://codereview.chromium.org/421653006/diff/1/chrome/browser/resources/options/browser_options.js ...
6 years, 4 months ago (2014-07-30 18:03:29 UTC) #2
Ilya Sherman
https://codereview.chromium.org/421653006/diff/1/tools/metrics/actions/actions.xml File tools/metrics/actions/actions.xml (right): https://codereview.chromium.org/421653006/diff/1/tools/metrics/actions/actions.xml#newcode8748 tools/metrics/actions/actions.xml:8748: <description>Please enter the description of the metric.</description> And please ...
6 years, 4 months ago (2014-07-30 20:35:16 UTC) #3
Yoyo Zhou
preference_api rubber stamp LGTM
6 years, 4 months ago (2014-07-30 20:35:54 UTC) #4
Bence
Thank you all for your great suggestions. The UI folks requested that we do not ...
6 years, 4 months ago (2014-08-01 14:36:47 UTC) #5
Bence
Joao: please review policy_prefs_browsertest.cc. Ilya, Steven: PTAL.
6 years, 4 months ago (2014-08-01 18:41:36 UTC) #6
Ilya Sherman
On 2014/08/01 18:41:36, Bence wrote: > Joao: please review policy_prefs_browsertest.cc. > Ilya, Steven: PTAL. What ...
6 years, 4 months ago (2014-08-01 18:43:43 UTC) #7
Bence
On 2014/08/01 18:43:43, Ilya Sherman wrote: > On 2014/08/01 18:41:36, Bence wrote: > > Joao: ...
6 years, 4 months ago (2014-08-01 18:46:30 UTC) #8
Joao da Silva
+bartfab who originally wrote that test policy_prefs_browsertest.cc lgtm given that the "fix" is meant to ...
6 years, 4 months ago (2014-08-01 21:06:18 UTC) #9
bartfab (slow)
https://codereview.chromium.org/421653006/diff/60001/chrome/browser/policy/policy_prefs_browsertest.cc File chrome/browser/policy/policy_prefs_browsertest.cc (right): https://codereview.chromium.org/421653006/diff/60001/chrome/browser/policy/policy_prefs_browsertest.cc#newcode727 chrome/browser/policy/policy_prefs_browsertest.cc:727: // kNetworkPredictionOptions, setting a user value. User values should ...
6 years, 4 months ago (2014-08-04 16:44:13 UTC) #10
Bence
Bartosz: This is an excellent point you bring up about setting user preferences. I modified ...
6 years, 4 months ago (2014-08-04 20:35:33 UTC) #11
stevenjb
https://codereview.chromium.org/421653006/diff/120001/chrome/browser/resources/options/browser_options.js File chrome/browser/resources/options/browser_options.js (right): https://codereview.chromium.org/421653006/diff/120001/chrome/browser/resources/options/browser_options.js#newcode1517 chrome/browser/resources/options/browser_options.js:1517: checkbox.checked = !(NetworkPredictionOptions.DEFAULT == DEFAULT != NEVER https://codereview.chromium.org/421653006/diff/120001/chrome/browser/resources/options/browser_options.js#newcode1520 chrome/browser/resources/options/browser_options.js:1520: ...
6 years, 4 months ago (2014-08-05 15:51:56 UTC) #12
bartfab (slow)
On 2014/08/04 20:35:33, Bence wrote: > Bartosz: This is an excellent point you bring up ...
6 years, 4 months ago (2014-08-05 17:27:08 UTC) #13
Bence
battre: Please review base/prefs/*, chrome/browser/net/prediction_options.*, and chrome/browser/prefs/browser_prefs.cc. bartfab: Thank you for your excellent point. I ...
6 years, 4 months ago (2014-08-06 19:38:17 UTC) #14
stevenjb
browser_options* lgtm
6 years, 4 months ago (2014-08-06 23:18:05 UTC) #15
battre
Bernhard, do you see a way to do the migration without opening up the PrefService? ...
6 years, 4 months ago (2014-08-07 07:56:52 UTC) #16
Bernhard Bauer
There is already PrefService::GetUserPrefValue(). We don't need to add a new method to Preference. https://codereview.chromium.org/421653006/diff/140001/chrome/browser/net/prediction_options.cc ...
6 years, 4 months ago (2014-08-07 08:32:18 UTC) #17
bartfab (slow)
Thanks for clarifying. The migration logic looks correct to me now. https://codereview.chromium.org/421653006/diff/140001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): ...
6 years, 4 months ago (2014-08-07 12:17:06 UTC) #18
Bernhard Bauer
https://codereview.chromium.org/421653006/diff/140001/chrome/browser/net/prediction_options.cc File chrome/browser/net/prediction_options.cc (right): https://codereview.chromium.org/421653006/diff/140001/chrome/browser/net/prediction_options.cc#newcode56 chrome/browser/net/prediction_options.cc:56: if (network_prediction_options->HasUserSetting()) On 2014/08/07 12:17:06, bartfab wrote: > On ...
6 years, 4 months ago (2014-08-07 12:24:12 UTC) #19
Bence
battre and/or Bernhard: PTAL. Bernhard: thank you for bringing PrefService::GetUserPrefValue to my attention. I reverted ...
6 years, 4 months ago (2014-08-07 13:50:02 UTC) #20
Bernhard Bauer
Yay! LGTM
6 years, 4 months ago (2014-08-07 13:52:26 UTC) #21
battre
chrome/browser/net/prediction_options.* LGTM as well
6 years, 4 months ago (2014-08-08 07:20:06 UTC) #22
Bence
The CQ bit was checked by bnc@chromium.org
6 years, 4 months ago (2014-08-08 12:18:33 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bnc@chromium.org/421653006/160002
6 years, 4 months ago (2014-08-08 12:18:52 UTC) #24
commit-bot: I haz the power
6 years, 4 months ago (2014-08-08 14:11:16 UTC) #25
Message was sent while issue was closed.
Change committed as 288352

Powered by Google App Engine
This is Rietveld 408576698