| 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 "net/disk_cache/simple/simple_index_file.h" | 5 #include "net/disk_cache/simple/simple_index_file.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/hash.h" | 12 #include "base/hash.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/message_loop/message_loop.h" |
| 15 #include "base/pickle.h" | 16 #include "base/pickle.h" |
| 16 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
| 17 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
| 18 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
| 19 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 21 #include "net/base/cache_type.h" | 22 #include "net/base/cache_type.h" |
| 22 #include "net/base/test_completion_callback.h" | 23 #include "net/base/test_completion_callback.h" |
| 23 #include "net/disk_cache/disk_cache_test_util.h" | 24 #include "net/disk_cache/disk_cache_test_util.h" |
| 24 #include "net/disk_cache/simple/simple_backend_impl.h" | 25 #include "net/disk_cache/simple/simple_backend_impl.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 closure.WaitForResult(); | 398 closure.WaitForResult(); |
| 398 | 399 |
| 399 // Check that the temporary file was deleted and the index file was created. | 400 // Check that the temporary file was deleted and the index file was created. |
| 400 EXPECT_FALSE(base::PathExists(simple_index_file.GetTempIndexFilePath())); | 401 EXPECT_FALSE(base::PathExists(simple_index_file.GetTempIndexFilePath())); |
| 401 EXPECT_TRUE(base::PathExists(simple_index_file.GetIndexFilePath())); | 402 EXPECT_TRUE(base::PathExists(simple_index_file.GetIndexFilePath())); |
| 402 } | 403 } |
| 403 | 404 |
| 404 #endif // defined(OS_POSIX) | 405 #endif // defined(OS_POSIX) |
| 405 | 406 |
| 406 } // namespace disk_cache | 407 } // namespace disk_cache |
| OLD | NEW |