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/process_util.h" | 13 #include "base/process_util.h" |
14 #include "base/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "net/disk_cache/disk_format.h" | 17 #include "net/disk_cache/disk_format.h" |
18 #include "net/tools/dump_cache/dump_files.h" | 18 #include "net/tools/dump_cache/dump_files.h" |
19 #include "net/tools/dump_cache/simple_cache_dumper.h" | 19 #include "net/tools/dump_cache/simple_cache_dumper.h" |
20 | 20 |
21 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 if (command_line.HasSwitch(kDumpContents)) | 176 if (command_line.HasSwitch(kDumpContents)) |
177 return DumpContents(input_path); | 177 return DumpContents(input_path); |
178 | 178 |
179 if (command_line.HasSwitch(kDumpHeaders)) | 179 if (command_line.HasSwitch(kDumpHeaders)) |
180 return DumpHeaders(input_path); | 180 return DumpHeaders(input_path); |
181 | 181 |
182 return Help(); | 182 return Help(); |
183 } | 183 } |
OLD | NEW |