Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: net/disk_cache/disk_cache.h

Issue 8896024: Reland r113261 rebased after revert of r113249. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/in_flight_backend_io.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // 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 #pragma once 10 #pragma once
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Marks the entry, specified by the given key, for deletion. The return value 91 // Marks the entry, specified by the given key, for deletion. The return value
92 // is a net error code. If this method returns ERR_IO_PENDING, the |callback| 92 // is a net error code. If this method returns ERR_IO_PENDING, the |callback|
93 // will be invoked after the entry is doomed. 93 // will be invoked after the entry is doomed.
94 virtual int DoomEntry(const std::string& key, 94 virtual int DoomEntry(const std::string& key,
95 OldCompletionCallback* callback) = 0; 95 OldCompletionCallback* callback) = 0;
96 96
97 // Marks all entries for deletion. The return value is a net error code. If 97 // Marks all entries for deletion. The return value is a net error code. If
98 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the 98 // this method returns ERR_IO_PENDING, the |callback| will be invoked when the
99 // operation completes. 99 // operation completes.
100 virtual int DoomAllEntries(OldCompletionCallback* callback) = 0; 100 virtual int DoomAllEntries(OldCompletionCallback* callback) = 0;
101 virtual int DoomAllEntries(const net::CompletionCallback& callback) = 0;
101 102
102 // Marks a range of entries for deletion. This supports unbounded deletes in 103 // Marks a range of entries for deletion. This supports unbounded deletes in
103 // either direction by using null Time values for either argument. The return 104 // either direction by using null Time values for either argument. The return
104 // value is a net error code. If this method returns ERR_IO_PENDING, the 105 // value is a net error code. If this method returns ERR_IO_PENDING, the
105 // |callback| will be invoked when the operation completes. 106 // |callback| will be invoked when the operation completes.
106 virtual int DoomEntriesBetween(const base::Time initial_time, 107 virtual int DoomEntriesBetween(const base::Time initial_time,
107 const base::Time end_time, 108 const base::Time end_time,
108 OldCompletionCallback* callback) = 0; 109 OldCompletionCallback* callback) = 0;
110 virtual int DoomEntriesBetween(const base::Time initial_time,
111 const base::Time end_time,
112 const net::CompletionCallback& callback) = 0;
109 113
110 // Marks all entries accessed since |initial_time| for deletion. The return 114 // Marks all entries accessed since |initial_time| for deletion. The return
111 // value is a net error code. If this method returns ERR_IO_PENDING, the 115 // value is a net error code. If this method returns ERR_IO_PENDING, the
112 // |callback| will be invoked when the operation completes. 116 // |callback| will be invoked when the operation completes.
113 virtual int DoomEntriesSince(const base::Time initial_time, 117 virtual int DoomEntriesSince(const base::Time initial_time,
114 OldCompletionCallback* callback) = 0; 118 OldCompletionCallback* callback) = 0;
115 119
116 // Enumerates the cache. Initialize |iter| to NULL before calling this method 120 // Enumerates the cache. Initialize |iter| to NULL before calling this method
117 // the first time. That will cause the enumeration to start at the head of 121 // the first time. That will cause the enumeration to start at the head of
118 // the cache. For subsequent calls, pass the same |iter| pointer again without 122 // the cache. For subsequent calls, pass the same |iter| pointer again without
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Note: This method is deprecated. 299 // Note: This method is deprecated.
296 virtual int ReadyForSparseIO(OldCompletionCallback* completion_callback) = 0; 300 virtual int ReadyForSparseIO(OldCompletionCallback* completion_callback) = 0;
297 301
298 protected: 302 protected:
299 virtual ~Entry() {} 303 virtual ~Entry() {}
300 }; 304 };
301 305
302 } // namespace disk_cache 306 } // namespace disk_cache
303 307
304 #endif // NET_DISK_CACHE_DISK_CACHE_H_ 308 #endif // NET_DISK_CACHE_DISK_CACHE_H_
OLDNEW
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/in_flight_backend_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698