Chromium Code Reviews| 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..2586f6e49b3c7bd32f05a50114235d7ecbdaae83 |
| --- /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 SetupTrackedPrefererencesMigration( |
|
Bernhard Bauer
2014/04/29 15:13:04
There's one "re" too much in there :)
gab
2014/04/29 15:46:44
Haha, good catch, introducing some rimes in the tr
|
| + 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_ |