diff options
Diffstat (limited to 'net/disk_cache/disk_cache.h')
-rw-r--r-- | net/disk_cache/disk_cache.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h index 516edb5..3e0efa6 100644 --- a/net/disk_cache/disk_cache.h +++ b/net/disk_cache/disk_cache.h @@ -33,7 +33,7 @@ namespace disk_cache { class Entry; class Backend; -typedef net::CompletionCallback CompletionCallback; +typedef net::OldCompletionCallback OldCompletionCallback; // Returns an instance of a Backend of the given |type|. |path| points to a // folder where the cached data will be stored (if appropriate). This cache @@ -54,7 +54,7 @@ NET_EXPORT int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes, bool force, base::MessageLoopProxy* thread, net::NetLog* net_log, Backend** backend, - CompletionCallback* callback); + OldCompletionCallback* callback); // The root interface for a disk cache instance. class NET_EXPORT Backend { @@ -77,7 +77,7 @@ class NET_EXPORT Backend { // will be invoked when the entry is available. The pointer to receive the // |entry| must remain valid until the operation completes. virtual int OpenEntry(const std::string& key, Entry** entry, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Creates a new entry. Upon success, the out param holds a pointer to an // Entry object representing the newly created disk cache entry. When the @@ -86,18 +86,18 @@ class NET_EXPORT Backend { // the |callback| will be invoked when the entry is available. The pointer to // receive the |entry| must remain valid until the operation completes. virtual int CreateEntry(const std::string& key, Entry** entry, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Marks the entry, specified by the given key, for deletion. The return value // is a net error code. If this method returns ERR_IO_PENDING, the |callback| // will be invoked after the entry is doomed. virtual int DoomEntry(const std::string& key, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Marks all entries for deletion. The return value is a net error code. If // this method returns ERR_IO_PENDING, the |callback| will be invoked when the // operation completes. - virtual int DoomAllEntries(CompletionCallback* callback) = 0; + virtual int DoomAllEntries(OldCompletionCallback* callback) = 0; // Marks a range of entries for deletion. This supports unbounded deletes in // either direction by using null Time values for either argument. The return @@ -105,13 +105,13 @@ class NET_EXPORT Backend { // |callback| will be invoked when the operation completes. virtual int DoomEntriesBetween(const base::Time initial_time, const base::Time end_time, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Marks all entries accessed since |initial_time| for deletion. The return // value is a net error code. If this method returns ERR_IO_PENDING, the // |callback| will be invoked when the operation completes. virtual int DoomEntriesSince(const base::Time initial_time, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Enumerates the cache. Initialize |iter| to NULL before calling this method // the first time. That will cause the enumeration to start at the head of @@ -126,7 +126,7 @@ class NET_EXPORT Backend { // NOTE: This method does not modify the last_used field of the entry, and // therefore it does not impact the eviction ranking of the entry. virtual int OpenNextEntry(void** iter, Entry** next_entry, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Releases iter without returning the next entry. Whenever OpenNextEntry() // returns true, but the caller is not interested in continuing the @@ -178,7 +178,7 @@ class NET_EXPORT Entry { // having to wait for all the callbacks, and still rely on the cleanup // performed from the callback code. virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, - CompletionCallback* completion_callback) = 0; + OldCompletionCallback* completion_callback) = 0; // Copies cache data from the given buffer of length |buf_len|. If // completion_callback is null, then this call blocks until the write @@ -194,7 +194,7 @@ class NET_EXPORT Entry { // If truncate is true, this call will truncate the stored data at the end of // what we are writing here. virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, - CompletionCallback* completion_callback, + OldCompletionCallback* completion_callback, bool truncate) = 0; // Sparse entries support: @@ -242,7 +242,7 @@ class NET_EXPORT Entry { // Behaves like ReadData() except that this method is used to access sparse // entries. virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, - CompletionCallback* completion_callback) = 0; + OldCompletionCallback* completion_callback) = 0; // Behaves like WriteData() except that this method is used to access sparse // entries. |truncate| is not part of this interface because a sparse entry @@ -251,7 +251,7 @@ class NET_EXPORT Entry { // that the content has changed), the whole entry should be doomed and // re-created. virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, - CompletionCallback* completion_callback) = 0; + OldCompletionCallback* completion_callback) = 0; // Returns information about the currently stored portion of a sparse entry. // |offset| and |len| describe a particular range that should be scanned to @@ -263,7 +263,7 @@ class NET_EXPORT Entry { // this method returns ERR_IO_PENDING, the |callback| will be invoked when the // operation completes, and |start| must remain valid until that point. virtual int GetAvailableRange(int64 offset, int len, int64* start, - CompletionCallback* callback) = 0; + OldCompletionCallback* callback) = 0; // Returns true if this entry could be a sparse entry or false otherwise. This // is a quick test that may return true even if the entry is not really @@ -293,7 +293,7 @@ class NET_EXPORT Entry { // Note that CancelSparseIO may have been called on another instance of this // object that refers to the same physical disk entry. // Note: This method is deprecated. - virtual int ReadyForSparseIO(CompletionCallback* completion_callback) = 0; + virtual int ReadyForSparseIO(OldCompletionCallback* completion_callback) = 0; protected: virtual ~Entry() {} |