| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/file_util.h" | |
| 9 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "base/threading/platform_thread.h" | 12 #include "base/threading/platform_thread.h" |
| 13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/io_buffer.h" | 15 #include "net/base/io_buffer.h" |
| 16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 17 #include "net/base/test_completion_callback.h" | 17 #include "net/base/test_completion_callback.h" |
| 18 #include "net/disk_cache/blockfile/backend_impl.h" | 18 #include "net/disk_cache/blockfile/backend_impl.h" |
| 19 #include "net/disk_cache/blockfile/entry_impl.h" | 19 #include "net/disk_cache/blockfile/entry_impl.h" |
| (...skipping 4038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 EXPECT_EQ(kSize, callback.GetResult(ret)); | 4058 EXPECT_EQ(kSize, callback.GetResult(ret)); |
| 4059 | 4059 |
| 4060 // Make sure the first range was removed when the second was written. | 4060 // Make sure the first range was removed when the second was written. |
| 4061 ret = entry->ReadSparseData(0, buffer.get(), kSize, callback.callback()); | 4061 ret = entry->ReadSparseData(0, buffer.get(), kSize, callback.callback()); |
| 4062 EXPECT_EQ(0, callback.GetResult(ret)); | 4062 EXPECT_EQ(0, callback.GetResult(ret)); |
| 4063 | 4063 |
| 4064 entry->Close(); | 4064 entry->Close(); |
| 4065 } | 4065 } |
| 4066 | 4066 |
| 4067 #endif // defined(OS_POSIX) | 4067 #endif // defined(OS_POSIX) |
| OLD | NEW |