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

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

Issue 7461106: Inform disk cache of WebKit memory cache hits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move http check Created 9 years, 4 months 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
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // Releases iter without returning the next entry. Whenever OpenNextEntry() 131 // Releases iter without returning the next entry. Whenever OpenNextEntry()
132 // returns true, but the caller is not interested in continuing the 132 // returns true, but the caller is not interested in continuing the
133 // enumeration by calling OpenNextEntry() again, the enumeration must be 133 // enumeration by calling OpenNextEntry() again, the enumeration must be
134 // ended by calling this method with iter returned by OpenNextEntry(). 134 // ended by calling this method with iter returned by OpenNextEntry().
135 virtual void EndEnumeration(void** iter) = 0; 135 virtual void EndEnumeration(void** iter) = 0;
136 136
137 // Return a list of cache statistics. 137 // Return a list of cache statistics.
138 virtual void GetStats( 138 virtual void GetStats(
139 std::vector<std::pair<std::string, std::string> >* stats) = 0; 139 std::vector<std::pair<std::string, std::string> >* stats) = 0;
140
141 // Called whenever an external cache in the system reuses the resource
142 // referred to by |key|.
143 virtual void OnExternalCacheHit(const std::string& key) = 0;
140 }; 144 };
141 145
142 // This interface represents an entry in the disk cache. 146 // This interface represents an entry in the disk cache.
143 class NET_TEST Entry { 147 class NET_TEST Entry {
144 public: 148 public:
145 // Marks this cache entry for deletion. 149 // Marks this cache entry for deletion.
146 virtual void Doom() = 0; 150 virtual void Doom() = 0;
147 151
148 // Releases this entry. Calling this method does not cancel pending IO 152 // Releases this entry. Calling this method does not cancel pending IO
149 // operations on this entry. Even after the last reference to this object has 153 // operations on this entry. Even after the last reference to this object has
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // Note: This method is deprecated. 295 // Note: This method is deprecated.
292 virtual int ReadyForSparseIO(CompletionCallback* completion_callback) = 0; 296 virtual int ReadyForSparseIO(CompletionCallback* completion_callback) = 0;
293 297
294 protected: 298 protected:
295 virtual ~Entry() {} 299 virtual ~Entry() {}
296 }; 300 };
297 301
298 } // namespace disk_cache 302 } // namespace disk_cache
299 303
300 #endif // NET_DISK_CACHE_DISK_CACHE_H_ 304 #endif // NET_DISK_CACHE_DISK_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698