summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 17:52:50 +0000
committerrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 17:52:50 +0000
commit06aaa4ee8dfa6e3538fb6343f03d7263ab26655f (patch)
treedbe72df7ad4a9e09704339ce61ddc57f249f3225 /media
parent223db0ba0a8a5b4eb69d9748fd16bac4bf0dce07 (diff)
downloadchromium_src-06aaa4ee8dfa6e3538fb6343f03d7263ab26655f.zip
chromium_src-06aaa4ee8dfa6e3538fb6343f03d7263ab26655f.tar.gz
chromium_src-06aaa4ee8dfa6e3538fb6343f03d7263ab26655f.tar.bz2
Revert 269346 "Introduce a new framework for back-and-forth trac..."
Fails JsonPrefStoreTest.RemoveClearsEmptyParent on Linux ASan. http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/2074/steps/base_unittests/logs/RemoveClearsEmptyParent > Introduce a new framework for back-and-forth tracked preference migration > between Protected Preferences and unprotected Preferences. > > Migration from unprotected Preferences to Protected Preferences was previously > done after both stores had been initialized. This was inherently incorrect as > some operations (PrefHashFilter::FilterOnLoad) would occur before the values > had been moved to the proper store. It also introduced a weird method in > PrefHashFilter::MigrateValues which required an independent PrefHashFilter > (backed by a copy of the real PrefHashStore). This after-the-fact migration > caused Settings.TrackedPreferenceCleared spikes when changing a value from > being enforced to not being enforced (as we'd have a MAC, but no value yet in > this store when running FilterOnLoad()) and more importantly it also caused > issue 365769 -- both of these issues highlight the incorrectness of the > current approach. > > The migration back from Protected Preferences to unprotected Preferences when > enforcement was disabled was using yet another mechanism which would only kick > in when a given pref was written to (ref. old non-const > SegregatedPrefStore::StoreForKey()). > > The new framework intercepts PrefFilter::FilterOnLoad() events for both stores > and does the back-and-forth migration in place before it even hands them back > to the PrefFilter::FinalizeFilterOnLoad() which then hands it back to the > JsonPrefStores (so that they are agnostic to the migration; from their point > of view their values were always in their store as they received it). > Furthermore, this new framework will easily allow us to later move MACs out of > Local State into their respective stores (which is a task on our radar which > we currently have no easy way to accomplish). > > The new framework also handles read errors better. For example, it was > previously possible for the unprotected->protected migration to result in data > loss if the protected store was somehow read-only from a read error while the > unprotected store wasn't -- resulting in an in-memory migration only flushed > to disk in the store from which the value was deleted... The new framework > handles those cases, preferring temporary data duplication over potential data > loss (duplicated data is cleaned up once confirmation is obtained that the new > authority for this data has been successfully written to disk -- it will even > try again in following Chrome runs if it doesn't succeed in this one). > > BUG=365769 > TEST= > A) Make sure all kTrackedPrefs consistently report > Settings.TrackedPreferenceUnchanged across changes from various enforcement > levels (using --force-fieldtrials). > B) Make sure the prefs are properly migrated to their new store (and > subsequently cleaned up from their old store) when changing the > enforcement_level across multiple runs. > C) Make sure prefs are properly migrated in a quick startup/shutdown with a > new enforcement_level and that their old value is properly cleaned up in a > subsequent startup at the same enforcement_level (or re-migrated at another > enforcement_level). > > R=bauerb@chromium.org, stuartmorgan@chromium.org, thakis@chromium.org > > Review URL: https://codereview.chromium.org/257003007 TBR=gab@chromium.org Review URL: https://codereview.chromium.org/279943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
0 files changed, 0 insertions, 0 deletions