summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/disk_cache.h
Commit message (Collapse)AuthorAgeFilesLines
* Disk Cache: Remove deprecated methods from the disk cache interface.rvargas@google.com2010-06-171-54/+0
| | | | | | | | | | | BUG=26730 TEST=current tests Review URL: http://codereview.chromium.org/2869005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50147 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Update the disk cache tools and tests to uservargas@google.com2010-06-151-21/+0
| | | | | | | | | | | | the new interface (provide a cache thread and callback). BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2739007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49819 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Remove blocking calls to GetAvailableRange.rvargas@google.com2010-06-111-0/+10
| | | | | | | | | | | | | This seems to be the last piece of the http cache code that should be upgraded to non-blocking APIs. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/2663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49542 0039d316-1c4b-4281-b951-d872f2087c98
* Create a dedicated cache thread and use it to create thervargas@google.com2010-05-181-3/+6
| | | | | | | | | | | Http cache. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/1989014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47564 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add support for a dedicated cache thread.rvargas@google.com2010-04-291-8/+11
| | | | | | | | | | | | This is an interface-only change, nothing is really moving to another thread yet. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/983007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45974 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Use asynchronous Open/Create/Doom entry calls.rvargas@google.com2010-01-141-0/+7
| | | | | | | | | | | | | | | | More changes to the state machine: now we really issue asynchronous calls when getting new cache entries. We have to add a new serialization mechanism to the http cache in order to handle races among multiple requests creating and opening the same entry. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/523019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36211 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: New interface that enables asynchronous completionrvargas@google.com2009-11-051-6/+103
| | | | | | | | | | | of any operation that may block. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/355028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31160 0039d316-1c4b-4281-b951-d872f2087c98
* Final patch to convert disk cache to using FilePath instead oftony@chromium.org2009-10-151-1/+3
| | | | | | | | | | | wstring. After this patch, I'm able to start chrome in a user data dir with non-ascii characters on non-utf8 systems. BUG=24444 Review URL: http://codereview.chromium.org/267085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29136 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a method to cancel pending sparse operations.rvargas@google.com2009-10-081-0/+32
| | | | | | | | | | | | | | | | | | | The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Review URL: http://codereview.chromium.org/256090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Interface for the sparse cache support.rvargas@google.com2009-06-041-0/+53
| | | | | | | | | | | | This is just the interface declaration plus a mocked implementation of the interface. BUG=12258 TEST=none Review URL: http://codereview.chromium.org/119072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17669 0039d316-1c4b-4281-b951-d872f2087c98
* Remove code path that passes a file handle to the rendererhclam@chromium.org2009-05-291-23/+0
| | | | | | | | | | | | | | | | | | | | | | Since the code now does range request without any caching the code path for passing file handle is not used any more. Changes: 1. Remove response_data_file in webkit_glue::ResourceResponseHead 2. Remove response_data_file in net::ResourceInfo 3. Remove code that passes file handle using IPC 4. Remove code that passes file hadnle from network layer to ResourceDispatcherHost 5. Remove MediaResourceHandler 6. Remove code in disk_cache that expose the file handle 7. Remove ChromeURLRequestContext::CreateOffTheRecordForMedia() so no more OTR request context for media, in OTR mode simply memory cache is used 8. Reset cache size for media cache to default BUG=12249 BUG=12256 Review URL: http://codereview.chromium.org/113931 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17227 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-251-1/+2
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First implementation of TrimDeleted() and a fewrvargas@google.com2009-03-181-1/+1
| | | | | | | | | | other fixes related to the new eviction code. As before, almost everything is disabled by default. Review URL: http://codereview.chromium.org/48112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11995 0039d316-1c4b-4281-b951-d872f2087c98
* Highlights of changes:hclam@chromium.org2009-03-131-7/+6
| | | | | | | | | | | | | | | | | | | 1. Added entry to ResourceResponseHead so that it contains either a base::PlatformFile (OS_WIN) or base::FileDescriptor (OS_POSIX) for passing the file handle from browser to renderer process. 2. Also added IPC messages for reporting download progress and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress is added so that the peer is notified of the download progress in the renderer process. 3. Load flag to kick start the resource loading for media files. LOAD_MEDIA_RESOURCE is added so that ResourceDispatcherHost knows how to use a different ResourceHandler for handling media resource request. Review URL: http://codereview.chromium.org/27168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11661 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* New disk cache eviction algorithm (partial implementation).rvargas@google.com2009-03-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Disabled by a #def. When enabled, file format 2.1 is used, with a possible update from ver 2.0. If a version with this code disabled is run after the upgrade, it will just discard the file and go back to 2.0. We now put some of those extra list to use! Entries are separated into various lists depending on how often are used, and we keep track of previously evicted entries. If the new algorithm is not enabled, most of the code just goes through a different path (with the old code instead of the new one). One notable exception is OpenFollowingEntry, used to enumerate the entries on the cache; the code changed significantly to support the new version of the "cache iterator", but functionally should do the same as the current code. Review URL: http://codereview.chromium.org/27345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11145 0039d316-1c4b-4281-b951-d872f2087c98
* Proposed change to support resource loading for media files.hclam@chromium.org2009-03-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highlights of changes: - Added methods to disk_cache::Entry: - Entry::PrepareTargetAsExternalFile(int index) Prepare a stream in an entry to use external file for storage. - Entry::GetExternalFile(int index) Get the external file backing the stream in the entry. - Added a property "CacheType type_" to HttpCache, along with setter and getter. There shall be two cache types, COMMON_CACHE and MEDIA_CACHE for distinguishing between different purpose of HttpCache. We have this property to trigger special behavior for caching needs of media files. - Added static methods to ChromeURLRequestContext - ChromeURLRequestContext::CreateOriginalForMedia Create a URLRequestContext for media files for the original profile. - ChromeURLRequestContext::CreateOffTheRecordForMedia Create a URLRequestContext for media files for off the record profile. - Added method to Profile interface. - GetRequestContextForMedia To get the request context for media files from the context. Design decissions: - Enforce writing to external file by calling methods to Entry rather than construct Backend by a different flag. Since we only want a valid and full response to go into an external file rather than redirection response or erroneous response, we should let HttpCache::Transaction to decide when to have an external file for response data. We eliminate a lot of useless external cache files. - Adding the CacheType enum and property to HttpCache, we could allow possible (?) future extensions to HttpCache to handle other different caching needs. And there's no need to add change constructors of HttpCache, but maybe we should add a specific constructor to accomodate a media HttpCache? - Adding Profile::GetRequestContextForMedia() Since we will need to use this new request context in ResourceDispatcherHost, I think the best place to keep it is in the profile. Also we will expose to user that there's a separate cache for media, so it's better to expose it in the Profile level to allow settings to the media cache, e.g. max file size, etc. Review URL: http://codereview.chromium.org/19747 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10745 0039d316-1c4b-4281-b951-d872f2087c98
* Extend the IOBuffer to the disk cache.rvargas@google.com2009-02-121-4/+10
| | | | | | | | | | | This is cleanup from bug 5325. Original code review: http://codereview.chromium.org/20134/show Review URL: http://codereview.chromium.org/20251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9626 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 9528 to fix mac test_shell_testsrvargas@google.com2009-02-101-10/+4
| | | | | | Review URL: http://codereview.chromium.org/21236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9532 0039d316-1c4b-4281-b951-d872f2087c98
* Extend the IOBuffer to the disk cache.rvargas@google.com2009-02-101-4/+10
| | | | | | | | This is cleanup from bug 5325. Review URL: http://codereview.chromium.org/20134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9528 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-271-5/+5
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add net to the repository.initial.commit2008-07-261-0/+181
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14 0039d316-1c4b-4281-b951-d872f2087c98