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

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

Issue 7056019: net: Add NET_API to a few more files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2010 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>
11 #include <string> 11 #include <string>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "net/base/file_stream.h" 15 #include "net/base/file_stream.h"
16 #include "net/disk_cache/block_files.h" 16 #include "net/disk_cache/block_files.h"
17 #include "net/disk_cache/disk_format.h" 17 #include "net/disk_cache/disk_format.h"
18 #include "net/disk_cache/mapped_file.h" 18 #include "net/disk_cache/mapped_file.h"
19 #include "net/disk_cache/storage_block.h" 19 #include "net/disk_cache/storage_block.h"
20 #include "net/disk_cache/storage_block-inl.h"
wtc 2011/05/20 22:21:19 How is this change related to building net as a DL
rvargas (doing something else) 2011/05/20 22:54:55 I really don't understand how it works for the sta
20 21
21 namespace { 22 namespace {
22 23
23 const wchar_t kIndexName[] = L"index"; 24 const wchar_t kIndexName[] = L"index";
24 const wchar_t kDataPrefix[] = L"data_"; 25 const wchar_t kDataPrefix[] = L"data_";
25 26
26 // Reads the |header_size| bytes from the beginning of file |name|. 27 // Reads the |header_size| bytes from the beginning of file |name|.
27 bool ReadHeader(const std::wstring& name, char* header, int header_size) { 28 bool ReadHeader(const std::wstring& name, char* header, int header_size) {
28 net::FileStream file; 29 net::FileStream file;
29 file.Open(FilePath::FromWStringHack(name), 30 file.Open(FilePath::FromWStringHack(name),
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 DumpEntry(entry); 319 DumpEntry(entry);
319 disk_cache::RankingsNode rankings; 320 disk_cache::RankingsNode rankings;
320 if (dumper.LoadRankings(entry.rankings_node, &rankings)) 321 if (dumper.LoadRankings(entry.rankings_node, &rankings))
321 DumpRankings(rankings); 322 DumpRankings(rankings);
322 } 323 }
323 324
324 printf("Done.\n"); 325 printf("Done.\n");
325 326
326 return 0; 327 return 0;
327 } 328 }
OLDNEW
« net/proxy/dhcp_proxy_script_fetcher_factory.h ('K') | « net/proxy/dhcp_proxy_script_fetcher_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698