| Index: chrome/browser/prefs/tracked/tracked_preferences_migration.h
|
| diff --git a/chrome/browser/prefs/tracked/tracked_preferences_migration.h b/chrome/browser/prefs/tracked/tracked_preferences_migration.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f893e341a05817b2e79e23c98912f1472c9c9a2e
|
| --- /dev/null
|
| +++ b/chrome/browser/prefs/tracked/tracked_preferences_migration.h
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_PREFS_TRACKED_TRACKED_PREFERENCES_MIGRATION_H_
|
| +#define CHROME_BROWSER_PREFS_TRACKED_TRACKED_PREFERENCES_MIGRATION_H_
|
| +
|
| +#include <set>
|
| +#include <string>
|
| +
|
| +class JsonPrefStore;
|
| +
|
| +// Sets up JsonPrefStore::OnFileReadInterceptors on |unprotected_pref_store|
|
| +// and |protected_pref_store| such that they are only handed back to their
|
| +// respective JsonPrefStores on read after we've made sure that the most recent
|
| +// pref value for |unprotected_pref_names| are in the |unprotected_pref_store|
|
| +// and conversely for protected preferences.
|
| +// NOTE: In the event of a synchronous read request (i.e.,
|
| +// JsonPrefStore::ReadPrefs()): the JsonPrefStore::OnFileReadInterceptors will
|
| +// make the first read asynchronous, but the double read will complete
|
| +// synchronously on the second ReadPrefs().
|
| +void SetupTrackedPreferencesMigration(
|
| + const std::set<std::string>& unprotected_pref_names,
|
| + const std::set<std::string>& protected_pref_names,
|
| + JsonPrefStore* unprotected_pref_store,
|
| + JsonPrefStore* protected_pref_store);
|
| +
|
| +#endif // CHROME_BROWSER_PREFS_TRACKED_TRACKED_PREFERENCES_MIGRATION_H_
|
|
|