[Reland] Refactoring of SBER preference usage, this time without introducing a static initializer in preference_api.
This reverts commit 5ddd173bd9aef153574bbe4639fa190780c65348.
[Original CL description]
Refactoring usage of SBER preference.
Moved (most of) the references of this pref into a shared util file, and
updated
calling code to use it.
The vast majority of the code just cares about whether the opt-in is on
or off.
A handful of other code (mostly unittests) need the name of the pref so
they can
set it.
The primary outliers are 1) profile.cc (where the pref is
first registered by name), and 2) safe_browsing_service.cc (where it
listens for
changes to the pref). These may be handled in future refactoring.
BUG=653122
Review-Url: https://chromiumcodereview.appspot.com/2418813002
Cr-Commit-Position: refs/heads/master@{#426565}
34 files changed