Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: net/tools/dump_cache/dump_files.cc

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios breakage Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/dump_cache/dump_cache.cc ('k') | net/tools/dump_cache/upgrade_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/tools/dump_cache/dump_files.h" 9 #include "net/tools/dump_cache/dump_files.h"
10 10
11 #include <stdio.h> 11 #include <stdio.h>
12 12
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 15
16 #include "base/file_util.h" 16 #include "base/file_util.h"
17 #include "base/files/file_enumerator.h" 17 #include "base/files/file_enumerator.h"
18 #include "base/format_macros.h" 18 #include "base/format_macros.h"
19 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
20 #include "net/base/file_stream.h" 20 #include "net/base/file_stream.h"
21 #include "net/disk_cache/block_files.h" 21 #include "net/disk_cache/blockfile/block_files.h"
22 #include "net/disk_cache/disk_format.h" 22 #include "net/disk_cache/blockfile/disk_format.h"
23 #include "net/disk_cache/mapped_file.h" 23 #include "net/disk_cache/blockfile/mapped_file.h"
24 #include "net/disk_cache/stats.h" 24 #include "net/disk_cache/blockfile/stats.h"
25 #include "net/disk_cache/storage_block-inl.h" 25 #include "net/disk_cache/blockfile/storage_block-inl.h"
26 #include "net/disk_cache/storage_block.h" 26 #include "net/disk_cache/blockfile/storage_block.h"
27 27
28 namespace { 28 namespace {
29 29
30 const base::FilePath::CharType kIndexName[] = FILE_PATH_LITERAL("index"); 30 const base::FilePath::CharType kIndexName[] = FILE_PATH_LITERAL("index");
31 31
32 // Reads the |header_size| bytes from the beginning of file |name|. 32 // Reads the |header_size| bytes from the beginning of file |name|.
33 bool ReadHeader(const base::FilePath& name, char* header, int header_size) { 33 bool ReadHeader(const base::FilePath& name, char* header, int header_size) {
34 net::FileStream file(NULL); 34 net::FileStream file(NULL);
35 file.OpenSync(name, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ); 35 file.OpenSync(name, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
36 if (!file.IsOpen()) { 36 if (!file.IsOpen()) {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 DumpEntry(entry); 365 DumpEntry(entry);
366 disk_cache::RankingsNode rankings; 366 disk_cache::RankingsNode rankings;
367 if (dumper.LoadRankings(entry.rankings_node, &rankings)) 367 if (dumper.LoadRankings(entry.rankings_node, &rankings))
368 DumpRankings(rankings); 368 DumpRankings(rankings);
369 } 369 }
370 370
371 printf("Done.\n"); 371 printf("Done.\n");
372 372
373 return 0; 373 return 0;
374 } 374 }
OLDNEW
« no previous file with comments | « net/tools/dump_cache/dump_cache.cc ('k') | net/tools/dump_cache/upgrade_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698