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/pickle.h" | 15 #include "base/pickle.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/strings/stringprintf.h" | |
19 #include "base/threading/thread.h" | 18 #include "base/threading/thread.h" |
20 #include "base/threading/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
21 #include "base/time/time.h" | 20 #include "base/time/time.h" |
22 #include "net/base/cache_type.h" | 21 #include "net/base/cache_type.h" |
23 #include "net/base/test_completion_callback.h" | 22 #include "net/base/test_completion_callback.h" |
24 #include "net/disk_cache/disk_cache_test_util.h" | 23 #include "net/disk_cache/disk_cache_test_util.h" |
25 #include "net/disk_cache/simple/simple_backend_impl.h" | 24 #include "net/disk_cache/simple/simple_backend_impl.h" |
26 #include "net/disk_cache/simple/simple_backend_version.h" | 25 #include "net/disk_cache/simple/simple_backend_version.h" |
27 #include "net/disk_cache/simple/simple_entry_format.h" | 26 #include "net/disk_cache/simple/simple_entry_format.h" |
28 #include "net/disk_cache/simple/simple_index.h" | 27 #include "net/disk_cache/simple/simple_index.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 closure.WaitForResult(); | 397 closure.WaitForResult(); |
399 | 398 |
400 // Check that the temporary file was deleted and the index file was created. | 399 // Check that the temporary file was deleted and the index file was created. |
401 EXPECT_FALSE(base::PathExists(simple_index_file.GetTempIndexFilePath())); | 400 EXPECT_FALSE(base::PathExists(simple_index_file.GetTempIndexFilePath())); |
402 EXPECT_TRUE(base::PathExists(simple_index_file.GetIndexFilePath())); | 401 EXPECT_TRUE(base::PathExists(simple_index_file.GetIndexFilePath())); |
403 } | 402 } |
404 | 403 |
405 #endif // defined(OS_POSIX) | 404 #endif // defined(OS_POSIX) |
406 | 405 |
407 } // namespace disk_cache | 406 } // namespace disk_cache |
OLD | NEW |