| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Performs basic inspection of the disk cache files with minimal disruption | 5 // Performs basic inspection of the disk cache files with minimal disruption |
| 6 // to the actual files (they still may change if an error is detected on the | 6 // to the actual files (they still may change if an error is detected on the |
| 7 // files). | 7 // files). |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 printf("data addr %d: 0x%x\n", i, entry.data_addr[i]); | 250 printf("data addr %d: 0x%x\n", i, entry.data_addr[i]); |
| 251 } | 251 } |
| 252 printf("----------\n\n"); | 252 printf("----------\n\n"); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void DumpRankings(const disk_cache::RankingsNode& rankings) { | 255 void DumpRankings(const disk_cache::RankingsNode& rankings) { |
| 256 printf("next: 0x%x\n", rankings.next); | 256 printf("next: 0x%x\n", rankings.next); |
| 257 printf("prev: 0x%x\n", rankings.prev); | 257 printf("prev: 0x%x\n", rankings.prev); |
| 258 printf("entry: 0x%x\n", rankings.contents); | 258 printf("entry: 0x%x\n", rankings.contents); |
| 259 printf("dirty: %d\n", rankings.dirty); | 259 printf("dirty: %d\n", rankings.dirty); |
| 260 printf("pointer: 0x%x\n", rankings.dummy); | 260 printf("hash: 0x%x\n", rankings.self_hash); |
| 261 printf("----------\n\n"); | 261 printf("----------\n\n"); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace. | 264 } // namespace. |
| 265 | 265 |
| 266 // ----------------------------------------------------------------------- | 266 // ----------------------------------------------------------------------- |
| 267 | 267 |
| 268 int GetMajorVersion(const std::wstring& input_path) { | 268 int GetMajorVersion(const std::wstring& input_path) { |
| 269 std::wstring index_name(input_path); | 269 std::wstring index_name(input_path); |
| 270 file_util::AppendToPath(&index_name, kIndexName); | 270 file_util::AppendToPath(&index_name, kIndexName); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 DumpEntry(entry); | 319 DumpEntry(entry); |
| 320 disk_cache::RankingsNode rankings; | 320 disk_cache::RankingsNode rankings; |
| 321 if (dumper.LoadRankings(entry.rankings_node, &rankings)) | 321 if (dumper.LoadRankings(entry.rankings_node, &rankings)) |
| 322 DumpRankings(rankings); | 322 DumpRankings(rankings); |
| 323 } | 323 } |
| 324 | 324 |
| 325 printf("Done.\n"); | 325 printf("Done.\n"); |
| 326 | 326 |
| 327 return 0; | 327 return 0; |
| 328 } | 328 } |
| OLD | NEW |