OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/disk_cache/simple/simple_version_upgrade.h" | 5 #include "net/disk_cache/simple/simple_version_upgrade.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 #include "base/file_util.h" | |
10 #include "base/files/file.h" | 9 #include "base/files/file.h" |
11 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" |
12 #include "base/files/memory_mapped_file.h" | 12 #include "base/files/memory_mapped_file.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/pickle.h" | 14 #include "base/pickle.h" |
15 #include "net/disk_cache/simple/simple_backend_version.h" | 15 #include "net/disk_cache/simple/simple_backend_version.h" |
16 #include "net/disk_cache/simple/simple_entry_format_history.h" | 16 #include "net/disk_cache/simple/simple_entry_format_history.h" |
17 #include "third_party/zlib/zlib.h" | 17 #include "third_party/zlib/zlib.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // It is not possible to upgrade cache structures on disk that are of version | 21 // It is not possible to upgrade cache structures on disk that are of version |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 } | 191 } |
192 // Verify during the test stage that the upgraders are implemented for all | 192 // Verify during the test stage that the upgraders are implemented for all |
193 // versions. The release build would cause backend initialization failure | 193 // versions. The release build would cause backend initialization failure |
194 // which would then later lead to removing all files known to the backend. | 194 // which would then later lead to removing all files known to the backend. |
195 DCHECK_EQ(kSimpleVersion, version_from); | 195 DCHECK_EQ(kSimpleVersion, version_from); |
196 return false; | 196 return false; |
197 } | 197 } |
198 | 198 |
199 } // namespace disk_cache | 199 } // namespace disk_cache |
OLD | NEW |