Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / disk_cache / simple / simple_backend_version.h
blobfe350a2e886158824126ca8b9e628cf0c4c26f12
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_VERSION_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_VERSION_H_
8 namespace disk_cache {
10 // Short rules helping to think about data upgrades within Simple Cache:
11 // * ALL changes of on-disk data format, backward-compatible or not,
12 // forward-compatible or not, require updating the |kSimpleVersion|.
13 // * All cache Upgrades are performed on backend start, must be finished
14 // before the new backend starts processing any incoming operations.
15 // * If the Upgrade is not implemented for transition from
16 // |kSimpleVersion - 1| then the whole cache directory will be cleared.
17 // * Dropping cache data on disk or some of its parts can be a valid way to
18 // Upgrade.
19 const uint32 kSimpleVersion = 6;
21 // The version of the entry file(s) as written to disk. Must be updated iff the
22 // entry format changes with the overall backend version update.
23 const uint32 kSimpleEntryVersionOnDisk = 5;
25 } // namespace disk_cache
27 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_VERSION_H_