| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is not totally filled. This is required to allow two
consecutive writes to fill a given range without caring
about the actual start offset of the second one (as long as
it is right where the first one ended).
This CL also takes care of all pending TODOs of the sparse
disk cache. Sparse disk cache support is now feature
complete.
BUG=12258
TEST=unittests
Review URL: http://codereview.chromium.org/155590
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20988 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of sparse entries.
I started to add code to modify the children_map of the
parent entry when a child is evicted but that ended up
being too much trouble for too little gain. We have to be
prepared to handle the case of not finding a child entry
because there is no way to make sure that the process
doesn't go away at any time, so adding a lot of complexity
just to avoid an extra entry lookup is just not worth it.
On the other hand, potentially freeing up a lot of space when
a sparse entry is deleted (insetad of just waiting for the
eviction code to do the cleanup) seems like a good thing.
BUG=12258
TEST=unittest
Review URL: http://codereview.chromium.org/149306
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20325 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented the following methods:
MemEntryImpl::ReadSparseData
MemEntryImpl::WriteSparseData
MemEntryImpl::GetAvailableRange
TEST=DiskCacheEntryTest.Memory*
original CL: http://codereview.chromium.org/140049
Review URL: http://codereview.chromium.org/147217
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
TBR=rvargas
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/149041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19308 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented the following methods for memory only cache:
ReadSparseData
WriteSparseData
GetAvailableRange
BUG=12258
Review URL: http://codereview.chromium.org/140049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19270 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This is required to enable sparse caching.
BUG=12258
TEST=unittest
Review URL: http://codereview.chromium.org/146005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19069 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding Read/Write support.
BUG=12258
TEST=unittests.
original review: http://codereview.chromium.org/126179
Review URL: http://codereview.chromium.org/132031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18772 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
TBR=nsylvain
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18726 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding Read/Write support.
BUG=12258
TEST=unittests.
Review URL: http://codereview.chromium.org/126179
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18723 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defines enums for kParentEntry and kChildEntry in
MemEntryImpl. Also has code in MemBackendImpl to
create a slave entry. Parent entries are non-sparse
entries until sparse API are called on them, and
they would start to keep a list of child entries.
Child entries hold partial content and are not
susposed to be accessible from the public and
are managed by the parent entry that created it.
Child entries are registered in the backend's
ranking list to allow individual eviction. More
details about how child entries are to be used
are in the comments.
TEST=DiskCacheEntryTest.MemoryOnlyEnumerationWithSlaveEntries
Review URL: http://codereview.chromium.org/120004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18432 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the callback id... it's not useful anymore.
BUG=none
TEST=current unit tests.
Review URL: http://codereview.chromium.org/118407
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17924 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/21236
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9532 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
For a char*, sizeof() == arraysize(), so there is nothing wrong with the current code. However I think it's important to be clear that the lcpy() functions work in characters and not bytes. The danger would be accidently using sizeof() with wcslcpy, for example copying some code as an example or modifying old code to use a wchar instead of a char.
Review URL: http://codereview.chromium.org/17019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7536 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step to allow the http cache to store additional metadata
for certain entries.
The cache file format changes to version 2.0 so an effect of this cl is
that the borwser will discard the old cache files.
Review URL: http://codereview.chromium.org/12880
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6392 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/7995
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1475 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
async IO to be performed synchronously.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1414 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1200 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@591 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
(open/truncate/write/close), the current cache size should be modified accordingly. I'm also bumping up the version number for the cache files, to force re-creation with this revision.
BUG=1305909
TEST=Unit test.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291 0039d316-1c4b-4281-b951-d872f2087c98
|
|
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14 0039d316-1c4b-4281-b951-d872f2087c98
|