blob: 67eb95137cfd41bc72bba1deaea21b1e38c87ceb [file] [log] [blame] [view]
Greg Thompson47bdc672020-01-06 14:25:311# User Data Storage
2
3This document explains the Chromium policies for files in the `User Data`
4directory.
5
6[TOC]
7
8## Backward Compatibility
9
10Due to the nature of frequent updates, Chromium must always support loading data
11from files written by previous versions. A good rule of thumb is to leave
12migration code in place for *at least* one year (approximately 9 milestones with
13the current 6-week release cadence). It is not uncommon for clients to update
14from very old versions, so use good judgement for deciding when to remove
15migration code -- if the complexity is low, keep it indefinitely.
16
17## Version Downgrade Processing
18
19In cases where Chromium is run against a `User Data` directory written by a
20newer version, the browser may run to the extent possible with the following
21behaviors:
22
23* Versioned files that are apparently readable by the old version may be used
24 as-is and modified as needed. For example, a SQLite file containing a table
25 with a compatible version number no higher than that supported by the old
26 version.
27* Versioned files that cannot be read by the old version and contain user
28 configuration or user generated data are left on-disk unmodified. This
29 allows the data to be used again once the browser is updated. Furthermore,
30 the user should be notified via the [profile error
31 dialog](../chrome/browser/ui/profile_error_dialog.h) that their experience
32 may be degraded. For example, such a browsing session may not accumulate new
33 history database entries.
34* Versioned files that cannot be read by the old version and contain computed
35 or cached data may be either left on-disk unmodified or deleted and
36 replaced.
37
38## Post-branch Compatibility
39
40Breaking changes in data storage are forbidden once a branch has been created
41for a release. This guarantees that data written by a later build on a release
42branch can be read by previous versions on that same release branch.
43
44## See also
45
46* [User Data Directory](user_data_dir.md)