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

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

Issue 12880: Disk cache: Add support for an extra data stream for each cache entry.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "net/disk_cache/backend_impl.h" 8 #include "net/disk_cache/backend_impl.h"
9 #include "net/disk_cache/entry_impl.h" 9 #include "net/disk_cache/entry_impl.h"
10 10
11 namespace { 11 namespace {
12 12
13 const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\dump_cache_"; 13 const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\dump_cache_";
14 const int kChannelSize = 64 * 1024; 14 const int kChannelSize = 64 * 1024;
15 const int kNumStreams = 2; 15 const int kNumStreams = 4;
16 16
17 // Simple macro to print out formatted debug messages. It is similar to a DLOG 17 // Simple macro to print out formatted debug messages. It is similar to a DLOG
18 // except that it doesn't include a header. 18 // except that it doesn't include a header.
19 #ifdef NDEBUG 19 #ifdef NDEBUG
20 #define DEBUGMSG(...) {} 20 #define DEBUGMSG(...) {}
21 #else 21 #else
22 #define DEBUGMSG(...) { printf(__VA_ARGS__); } 22 #define DEBUGMSG(...) { printf(__VA_ARGS__); }
23 #endif 23 #endif
24 24
25 HANDLE OpenServer(const std::wstring pipe_number) { 25 HANDLE OpenServer(const std::wstring pipe_number) {
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 793
794 SlaveSM slave(&cache, pipe); 794 SlaveSM slave(&cache, pipe);
795 if (!slave.DoInit()) { 795 if (!slave.DoInit()) {
796 printf("Unable to talk with the main process\n"); 796 printf("Unable to talk with the main process\n");
797 return -1; 797 return -1;
798 } 798 }
799 799
800 loop.Run(); 800 loop.Run();
801 return 0; 801 return 0;
802 } 802 }
OLDNEW
« net/disk_cache/rankings.h ('K') | « net/tools/dump_cache/dump_files.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698