| 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_synchronous_entry.h" | 5 #include "net/disk_cache/simple/simple_synchronous_entry.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/hash.h" | 14 #include "base/hash.h" |
| 15 #include "base/location.h" | 15 #include "base/location.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/message_loop_proxy.h" | 17 #include "base/message_loop_proxy.h" |
| 18 #include "base/sha1.h" | 18 #include "base/sha1.h" |
| 19 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
| 20 #include "base/task_runner.h" | 20 #include "base/task_runner.h" |
| 21 #include "net/base/io_buffer.h" | 21 #include "net/base/io_buffer.h" |
| 22 #include "net/base/net_errors.h" | 22 #include "net/base/net_errors.h" |
| 23 #include "net/disk_cache/simple/simple_index_util.h" |
| 23 | 24 |
| 24 using base::ClosePlatformFile; | 25 using base::ClosePlatformFile; |
| 25 using base::FilePath; | 26 using base::FilePath; |
| 26 using base::GetPlatformFileInfo; | 27 using base::GetPlatformFileInfo; |
| 27 using base::PlatformFileError; | 28 using base::PlatformFileError; |
| 28 using base::PlatformFileInfo; | 29 using base::PlatformFileInfo; |
| 29 using base::PLATFORM_FILE_CREATE; | 30 using base::PLATFORM_FILE_CREATE; |
| 30 using base::PLATFORM_FILE_OK; | 31 using base::PLATFORM_FILE_OK; |
| 31 using base::PLATFORM_FILE_OPEN; | 32 using base::PLATFORM_FILE_OPEN; |
| 32 using base::PLATFORM_FILE_READ; | 33 using base::PLATFORM_FILE_READ; |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // TODO(gavinp): Clean up created files. | 305 // TODO(gavinp): Clean up created files. |
| 305 DLOG(WARNING) << "Could not write keys to new cache entry."; | 306 DLOG(WARNING) << "Could not write keys to new cache entry."; |
| 306 return false; | 307 return false; |
| 307 } | 308 } |
| 308 } | 309 } |
| 309 initialized_ = true; | 310 initialized_ = true; |
| 310 return true; | 311 return true; |
| 311 } | 312 } |
| 312 | 313 |
| 313 } // namespace disk_cache | 314 } // namespace disk_cache |
| OLD | NEW |