| OLD | NEW |
| 1 // Copyright (c) 2011 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/hash.h" | 10 #include "base/hash.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/test/perf_time_logger.h" | 12 #include "base/test/perf_time_logger.h" |
| 13 #include "base/test/test_file_util.h" | 13 #include "base/test/test_file_util.h" |
| 14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
| 16 #include "net/base/cache_type.h" | 16 #include "net/base/cache_type.h" |
| 17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
| 18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 19 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
| 20 #include "net/disk_cache/backend_impl.h" | |
| 21 #include "net/disk_cache/block_files.h" | |
| 22 #include "net/disk_cache/disk_cache.h" | 20 #include "net/disk_cache/disk_cache.h" |
| 23 #include "net/disk_cache/disk_cache_test_base.h" | 21 #include "net/disk_cache/disk_cache_test_base.h" |
| 24 #include "net/disk_cache/disk_cache_test_util.h" | 22 #include "net/disk_cache/disk_cache_test_util.h" |
| 23 #include "net/disk_cache/v2/backend_impl.h" |
| 24 #include "net/disk_cache/v2/block_files.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
| 26 #include "testing/platform_test.h" | 26 #include "testing/platform_test.h" |
| 27 | 27 |
| 28 using base::Time; | 28 using base::Time; |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 struct TestEntry { | 32 struct TestEntry { |
| 33 std::string key; | 33 std::string key; |
| 34 int data_len; | 34 int data_len; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 files.DeleteBlock(address[entry], false); | 242 files.DeleteBlock(address[entry], false); |
| 243 EXPECT_TRUE(files.CreateBlock(disk_cache::RANKINGS, BlockSize(), | 243 EXPECT_TRUE(files.CreateBlock(disk_cache::RANKINGS, BlockSize(), |
| 244 &address[entry])); | 244 &address[entry])); |
| 245 } | 245 } |
| 246 | 246 |
| 247 timer2.Done(); | 247 timer2.Done(); |
| 248 base::MessageLoop::current()->RunUntilIdle(); | 248 base::MessageLoop::current()->RunUntilIdle(); |
| 249 delete[] address; | 249 delete[] address; |
| 250 } | 250 } |
| OLD | NEW |