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

Issue 2838933002: MD Settings: fix policy control detection on default browser section (Closed)

Created:
3 years, 8 months ago by Dan Beam
Modified:
3 years, 8 months ago
Reviewers:
tommycli
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: fix policy control detection on default browser section All settings/ code was migrated from the older options/ directory. In this case, the old options default browser code used BooleanPrefMember, which is a typed wrapper around a PrefService. The code retrieved the effective value of the preference (whether it's true or false, for a bool) via BooleanPrefMember::GetValue(). The new code used a PrefService::Preference instead of a BooleanPrefMember, and this also has a GetValue() method that returns a base::Value* (NOT a boolean). New code checked Preference::GetValue() as an effective boolean value. This is effectively dead code (it will always succeed assuming the preference is registered correctly) and it did not successfully detect when the preference was false (meaning, when a policy was set to disable Chrome from setting the default browser). This patch updates the new code to actually check the bool within the base::Value* (rather than null check it in a way that always succeeds). R=tommycli@chromium.org BUG=711061 Review-Url: https://codereview.chromium.org/2838933002 Cr-Commit-Position: refs/heads/master@{#467133} Committed: https://chromium.googlesource.com/chromium/src/+/21f439f4fe7a4589c9a0405bc6a385d34a1f3394

Patch Set 1 : check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M chrome/browser/ui/webui/settings/settings_default_browser_handler.cc View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 8 (4 generated)
Dan Beam
i think we should handle testing separately, this most certainly deserves merge consideration
3 years, 8 months ago (2017-04-25 18:55:50 UTC) #2
tommycli
lgtm
3 years, 8 months ago (2017-04-25 20:01:46 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2838933002/20001
3 years, 8 months ago (2017-04-25 20:27:14 UTC) #5
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 22:14:25 UTC) #8
Message was sent while issue was closed.
Committed patchset #1 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/21f439f4fe7a4589c9a0405bc6a3...

Powered by Google App Engine
This is Rietveld 408576698