| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/memory_mapped_file.h" | 10 #include "base/files/memory_mapped_file.h" |
| 11 #include "base/hash.h" | 11 #include "base/hash.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/pickle.h" | 13 #include "base/pickle.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/task_runner_util.h" | 15 #include "base/task_runner_util.h" |
| 16 #include "base/threading/thread_restrictions.h" | 16 #include "base/threading/thread_restrictions.h" |
| 17 #include "net/disk_cache/simple/simple_backend_version.h" | 17 #include "net/disk_cache/simple/simple_backend_version.h" |
| 18 #include "net/disk_cache/simple/simple_entry_format.h" | 18 #include "net/disk_cache/simple/simple_entry_format.h" |
| 19 #include "net/disk_cache/simple/simple_histogram_macros.h" | 19 #include "net/disk_cache/simple/simple_histogram_macros.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 bool SimpleIndexFile::LegacyIsIndexFileStale( | 454 bool SimpleIndexFile::LegacyIsIndexFileStale( |
| 455 base::Time cache_last_modified, | 455 base::Time cache_last_modified, |
| 456 const base::FilePath& index_file_path) { | 456 const base::FilePath& index_file_path) { |
| 457 base::Time index_mtime; | 457 base::Time index_mtime; |
| 458 if (!simple_util::GetMTime(index_file_path, &index_mtime)) | 458 if (!simple_util::GetMTime(index_file_path, &index_mtime)) |
| 459 return true; | 459 return true; |
| 460 return index_mtime < cache_last_modified; | 460 return index_mtime < cache_last_modified; |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace disk_cache | 463 } // namespace disk_cache |
| OLD | NEW |