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

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

Created:
3 years, 7 months ago by Dan Beam
Modified:
3 years, 7 months ago
Reviewers:
tommycli
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3071
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} (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 #

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: 2 (1 generated)
Dan Beam
3 years, 7 months ago (2017-04-27 15:45:38 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
9d10431610e8f8ee9c2cc4c8db4c80bc4b14d401.

Powered by Google App Engine
This is Rietveld 408576698