| 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 #include "net/tools/dump_cache/upgrade_win.h" | 5 #include "net/tools/dump_cache/upgrade_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "base/win/scoped_handle.h" | 15 #include "base/win/scoped_handle.h" |
| 16 #include "googleurl/src/gurl.h" | |
| 17 #include "net/base/cache_type.h" | 16 #include "net/base/cache_type.h" |
| 18 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
| 19 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 20 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
| 21 #include "net/disk_cache/backend_impl.h" | 20 #include "net/disk_cache/backend_impl.h" |
| 22 #include "net/disk_cache/entry_impl.h" | 21 #include "net/disk_cache/entry_impl.h" |
| 23 #include "net/http/http_cache.h" | 22 #include "net/http/http_cache.h" |
| 24 #include "net/http/http_response_headers.h" | 23 #include "net/http/http_response_headers.h" |
| 25 #include "net/http/http_response_info.h" | 24 #include "net/http/http_response_info.h" |
| 26 #include "net/tools/dump_cache/cache_dumper.h" | 25 #include "net/tools/dump_cache/cache_dumper.h" |
| 26 #include "url/gurl.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\dump_cache_"; | 30 const wchar_t kPipePrefix[] = L"\\\\.\\pipe\\dump_cache_"; |
| 31 const int kChannelSize = 64 * 1024; | 31 const int kChannelSize = 64 * 1024; |
| 32 const int kNumStreams = 4; | 32 const int kNumStreams = 4; |
| 33 | 33 |
| 34 // Simple macro to print out formatted debug messages. It is similar to a DLOG | 34 // Simple macro to print out formatted debug messages. It is similar to a DLOG |
| 35 // except that it doesn't include a header. | 35 // except that it doesn't include a header. |
| 36 #ifdef NDEBUG | 36 #ifdef NDEBUG |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 | 918 |
| 919 SlaveSM slave(input_path, pipe); | 919 SlaveSM slave(input_path, pipe); |
| 920 if (!slave.DoInit()) { | 920 if (!slave.DoInit()) { |
| 921 printf("Unable to talk with the main process\n"); | 921 printf("Unable to talk with the main process\n"); |
| 922 return -1; | 922 return -1; |
| 923 } | 923 } |
| 924 | 924 |
| 925 loop.Run(); | 925 loop.Run(); |
| 926 return 0; | 926 return 0; |
| 927 } | 927 } |
| OLD | NEW |