| 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 // Defines the public interface of the disk cache. For more details see | 5 // Defines the public interface of the disk cache. For more details see |
| 6 // http://dev.chromium.org/developers/design-documents/network-stack/disk-cache | 6 // http://dev.chromium.org/developers/design-documents/network-stack/disk-cache |
| 7 | 7 |
| 8 #ifndef NET_DISK_CACHE_DISK_CACHE_H_ | 8 #ifndef NET_DISK_CACHE_DISK_CACHE_H_ |
| 9 #define NET_DISK_CACHE_DISK_CACHE_H_ | 9 #define NET_DISK_CACHE_DISK_CACHE_H_ |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Marks all entries for deletion. The return value is a net error code. If | 100 // Marks all entries for deletion. The return value is a net error code. If |
| 101 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the | 101 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the |
| 102 // operation completes. | 102 // operation completes. |
| 103 virtual int DoomAllEntries(const CompletionCallback& callback) = 0; | 103 virtual int DoomAllEntries(const CompletionCallback& callback) = 0; |
| 104 | 104 |
| 105 // Marks a range of entries for deletion. This supports unbounded deletes in | 105 // Marks a range of entries for deletion. This supports unbounded deletes in |
| 106 // either direction by using null Time values for either argument. The return | 106 // either direction by using null Time values for either argument. The return |
| 107 // value is a net error code. If this method returns ERR_IO_PENDING, the | 107 // value is a net error code. If this method returns ERR_IO_PENDING, the |
| 108 // |callback| will be invoked when the operation completes. | 108 // |callback| will be invoked when the operation completes. |
| 109 virtual int DoomEntriesBetween(const base::Time initial_time, | 109 virtual int DoomEntriesBetween(base::Time initial_time, |
| 110 const base::Time end_time, | 110 base::Time end_time, |
| 111 const CompletionCallback& callback) = 0; | 111 const CompletionCallback& callback) = 0; |
| 112 | 112 |
| 113 // Marks all entries accessed since |initial_time| for deletion. The return | 113 // Marks all entries accessed since |initial_time| for deletion. The return |
| 114 // value is a net error code. If this method returns ERR_IO_PENDING, the | 114 // value is a net error code. If this method returns ERR_IO_PENDING, the |
| 115 // |callback| will be invoked when the operation completes. | 115 // |callback| will be invoked when the operation completes. |
| 116 virtual int DoomEntriesSince(const base::Time initial_time, | 116 virtual int DoomEntriesSince(base::Time initial_time, |
| 117 const CompletionCallback& callback) = 0; | 117 const CompletionCallback& callback) = 0; |
| 118 | 118 |
| 119 // Enumerates the cache. Initialize |iter| to NULL before calling this method | 119 // Enumerates the cache. Initialize |iter| to NULL before calling this method |
| 120 // the first time. That will cause the enumeration to start at the head of | 120 // the first time. That will cause the enumeration to start at the head of |
| 121 // the cache. For subsequent calls, pass the same |iter| pointer again without | 121 // the cache. For subsequent calls, pass the same |iter| pointer again without |
| 122 // changing its value. This method returns ERR_FAILED when there are no more | 122 // changing its value. This method returns ERR_FAILED when there are no more |
| 123 // entries to enumerate. When the entry pointer is no longer needed, its | 123 // entries to enumerate. When the entry pointer is no longer needed, its |
| 124 // Close method should be called. The return value is a net error code. If | 124 // Close method should be called. The return value is a net error code. If |
| 125 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the | 125 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the |
| 126 // |next_entry| is available. The pointer to receive the |next_entry| must | 126 // |next_entry| is available. The pointer to receive the |next_entry| must |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // Note: This method is deprecated. | 302 // Note: This method is deprecated. |
| 303 virtual int ReadyForSparseIO(const CompletionCallback& callback) = 0; | 303 virtual int ReadyForSparseIO(const CompletionCallback& callback) = 0; |
| 304 | 304 |
| 305 protected: | 305 protected: |
| 306 virtual ~Entry() {} | 306 virtual ~Entry() {} |
| 307 }; | 307 }; |
| 308 | 308 |
| 309 } // namespace disk_cache | 309 } // namespace disk_cache |
| 310 | 310 |
| 311 #endif // NET_DISK_CACHE_DISK_CACHE_H_ | 311 #endif // NET_DISK_CACHE_DISK_CACHE_H_ |
| OLD | NEW |