Validate hashes based on the legacy device id from M33 on Windows without generally...
commitc2d6627b362f822cabdd811521a2ca959c0300f6
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 11 Mar 2014 20:20:03 +0000 (11 20:20 +0000)
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 11 Mar 2014 20:20:03 +0000 (11 20:20 +0000)
tree60713d18ae0a62bf8e48a53f6c0ff7468ffaee42
parent90e1b309ed1e103ba40bd012ad7f8fc137ef31ff
Validate hashes based on the legacy device id from M33 on Windows without generally hurting performance.

Introduces a new validation level (VALID_LEGACY_DEVICE_ID) from PrefHashCalculator and a new UMA histogram to go along with it.

The MAC address gathering code is a pure copy/paste from chrome/browser/extensions/api/music_manager_private/device_id_win.cc from an M33 checkout which is the implementation we want to keep around (see bug for a broader duplicate code justification).

BUG=350028
TEST=Run a chrome with this CL against an M33 User Data dir and confirm that every pref reports Settings.TrackedPreferenceUnchangeLegacyDeviceId (except for kExtensionsPref which is initialized to split pref as expected).
R=asvitkine@chromium.org, erikwright@chromium.org

First Committed In: https://src.chromium.org/viewvc/chrome?view=rev&revision=256047
Revert In (XP/Vista unit_tests failure): https://src.chromium.org/viewvc/chrome?view=rev&revision=256069

Review URL: https://codereview.chromium.org/190183002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256296 0039d316-1c4b-4281-b951-d872f2087c98
15 files changed:
chrome/browser/prefs/pref_hash_calculator.cc
chrome/browser/prefs/pref_hash_calculator.h
chrome/browser/prefs/pref_hash_calculator_unittest.cc
chrome/browser/prefs/pref_hash_filter_unittest.cc
chrome/browser/prefs/pref_hash_store_impl.cc
chrome/browser/prefs/pref_hash_store_impl_unittest.cc
chrome/browser/prefs/pref_hash_store_transaction.h
chrome/browser/prefs/tracked/pref_hash_calculator_helper.h [new file with mode: 0644]
chrome/browser/prefs/tracked/pref_hash_calculator_helper_stub.cc [new file with mode: 0644]
chrome/browser/prefs/tracked/pref_hash_calculator_helper_win.cc [new file with mode: 0644]
chrome/browser/prefs/tracked/pref_hash_calculator_helper_win_unittest.cc [new file with mode: 0644]
chrome/browser/prefs/tracked/tracked_preference_helper.cc
chrome/chrome_browser.gypi
chrome/chrome_tests_unit.gypi
tools/metrics/histograms/histograms.xml