OLD | NEW |
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 // This command-line program dumps the contents of a set of cache files, either | 5 // This command-line program dumps the contents of a set of cache files, either |
6 // to stdout or to another set of cache files. | 6 // to stdout or to another set of cache files. |
7 | 7 |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "net/disk_cache/disk_format.h" | 16 #include "net/disk_cache/blockfile/disk_format.h" |
17 #include "net/tools/dump_cache/dump_files.h" | 17 #include "net/tools/dump_cache/dump_files.h" |
18 #include "net/tools/dump_cache/simple_cache_dumper.h" | 18 #include "net/tools/dump_cache/simple_cache_dumper.h" |
19 | 19 |
20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
21 #include "base/process/launch.h" | 21 #include "base/process/launch.h" |
22 #include "base/win/scoped_handle.h" | 22 #include "base/win/scoped_handle.h" |
23 #include "net/tools/dump_cache/upgrade_win.h" | 23 #include "net/tools/dump_cache/upgrade_win.h" |
24 #endif | 24 #endif |
25 | 25 |
26 enum Errors { | 26 enum Errors { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 | 179 |
180 if (command_line.HasSwitch(kDumpContents)) | 180 if (command_line.HasSwitch(kDumpContents)) |
181 return DumpContents(input_path); | 181 return DumpContents(input_path); |
182 | 182 |
183 if (command_line.HasSwitch(kDumpHeaders)) | 183 if (command_line.HasSwitch(kDumpHeaders)) |
184 return DumpHeaders(input_path); | 184 return DumpHeaders(input_path); |
185 | 185 |
186 return Help(); | 186 return Help(); |
187 } | 187 } |
OLD | NEW |