| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |