Chromium Code Reviews
DescriptionMD 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}
(cherry picked from commit 21f439f4fe7a4589c9a0405bc6a385d34a1f3394)
Review-Url: https://codereview.chromium.org/2846043002 .
Cr-Commit-Position: refs/branch-heads/3071@{#263}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
Committed: https://chromium.googlesource.com/chromium/src/+/9d10431610e8f8ee9c2cc4c8db4c80bc4b14d401
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||