This function calls PrefService::GetPreferenceValuesWithoutPathExpansion() which I think is only used by this function. GetPreferenceValuesWithoutPathExpansion creates a large map of all preferences with the keys flattened and does a deep copy of all default values.
This list is then iterated over, and the preferences service is re-queried for each one. The non-default user-prefs are counted and logged.
This happens whenever the last browser window for a profile is closed and if the browser didn't exit cleanly, on startup.
Comment 1 by bugdroid1@chromium.org
, Apr 18 2017