summaryrefslogtreecommitdiffstats
path: root/webkit/appcache
Commit message (Collapse)AuthorAgeFilesLines
* Revert 35609 - AppCache quota tracking groundwork, store response sizes in ↵michaeln@google.com2010-01-0613-128/+29
| | | | | | | | | | | | | | the SQL database. TEST=updated existing unittests BUG=none Review URL: http://codereview.chromium.org/523046 TBR=michaeln@chromium.org Review URL: http://codereview.chromium.org/525059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35610 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache quota tracking groundwork, store response sizes in the SQL database.michaeln@chromium.org2010-01-0613-29/+128
| | | | | | | | | TEST=updated existing unittests BUG=none Review URL: http://codereview.chromium.org/523046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35609 0039d316-1c4b-4281-b951-d872f2087c98
* When an update job doesn't complete successfully, doom all responses created ↵michaeln@chromium.org2010-01-043-4/+12
| | | | | | | | | | | by that job. TEST=existing tests apply BUG=none Review URL: http://codereview.chromium.org/523039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35489 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some stale TODOs.michaeln@chromium.org2010-01-042-2/+0
| | | | | | | | | BUG=none TEST=none TBR=jorlow git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35470 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to address the failing appcache/remove-cache.html layout tests.michaeln@chromium.org2010-01-045-8/+20
| | | | | | | | | BUG=31300 TEST=yes, layout test Review URL: http://codereview.chromium.org/524014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35465 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for a crash when there is no DB thread (as is the case in some tests).michaeln@chromium.org2009-12-311-3/+6
| | | | | | | | | | BUG=none TEST=manual TBR=ananta Review URL: http://codereview.chromium.org/515075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35408 0039d316-1c4b-4281-b951-d872f2087c98
* Be sure to create and populate the meta table within the transaction that ↵michaeln@chromium.org2009-12-301-6/+8
| | | | | | | | | | | creates the rest of the schema. BUG=none TEST=existing tests apply Review URL: http://codereview.chromium.org/518023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35396 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup, removed unused URLRequestJob::GetMoreData() method.michaeln@chromium.org2009-12-302-8/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/515063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35385 0039d316-1c4b-4281-b951-d872f2087c98
* AppCacheDatabase and SQL based AppCacheStorageImpl. michaeln@chromium.org2009-12-2917-26/+3577
| | | | | | | | | | | | | | | Still nothing is being written to disk with this CL, in-memory SQLite and DiskCaches are being utilized. Responses are not yet being removed from the DiskCasche when the should be. Once that's done (in the next CL), we'll start saving things on disk. BUG=none TEST=appcache_database_unittest.cc, appcache_storage_impl_unittest.cc Review URL: http://codereview.chromium.org/518020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35354 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 35328 - AppCacheDatabase and SQL based AppCacheStorageImpl.michaeln@google.com2009-12-2915-3565/+25
| | | | | | | | | | | | | | | | | | Still nothing is being written to disk with this CL, inmemory SQLite and DiskCaches are being utilized. Responses are not yet being removed from the DiskCasche when the should be. Once that's done (in the next CL), we'll start saving things on disk. BUG=none TEST=appcache_database_unittest.cc, appcache_storage_impl_unittest.cc Review URL: http://codereview.chromium.org/501033 TBR=michaeln@chromium.org Review URL: http://codereview.chromium.org/519018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35329 0039d316-1c4b-4281-b951-d872f2087c98
* AppCacheDatabase and SQL based AppCacheStorageImpl.michaeln@chromium.org2009-12-2915-25/+3565
| | | | | | | | | | | | | | | Still nothing is being written to disk with this CL, in-memory SQLite and DiskCaches are being utilized. Responses are not yet being removed from the DiskCasche when the should be. Once that's done (in the next CL), we'll start saving things on disk. BUG=none TEST=appcache_database_unittest.cc, appcache_storage_impl_unittest.cc Review URL: http://codereview.chromium.org/501033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35328 0039d316-1c4b-4281-b951-d872f2087c98
* Clarify licenses on a bunch of files.evan@chromium.org2009-12-299-9/+9
| | | | | | | | | | | In this process, I also filed bugs on various projects we depend on that also have unclear licenses. BUG=28291 Review URL: http://codereview.chromium.org/521009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35323 0039d316-1c4b-4281-b951-d872f2087c98
* Fix valgrind mem leak in AppCacheUpdateJobTest and remove suppression.jennb@chromium.org2009-12-221-4/+0
| | | | | | | | | TEST=valgrind test_shell_tests BUG=none Review URL: http://codereview.chromium.org/501175 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35179 0039d316-1c4b-4281-b951-d872f2087c98
* Make appcache update conditionally include If-Modified-Since and ↵jennb@chromium.org2009-12-224-6/+410
| | | | | | | | | | | If-None-Match headers when fetching a manifest. TEST=new tests added BUG=none Review URL: http://codereview.chromium.org/500152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35153 0039d316-1c4b-4281-b951-d872f2087c98
* During appcache update, copy response from newest complete cache if http ↵jennb@chromium.org2009-12-163-41/+269
| | | | | | | | | | | | caching semantics allow rather than make a network request. TEST=new tests added BUG=none Review URL: http://codereview.chromium.org/491064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34727 0039d316-1c4b-4281-b951-d872f2087c98
* Queue appcache update if current update process is terminating.jennb@chromium.org2009-12-107-3/+256
| | | | | | | | | TEST=update and group unittests added BUG=none Review URL: http://codereview.chromium.org/465132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34299 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore URL fragment when looking up URL in application cache.jennb@chromium.org2009-12-021-3/+12
| | | | | | | | | TEST=no new tests; covered by existing layout test BUG=none Review URL: http://codereview.chromium.org/459004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33532 0039d316-1c4b-4281-b951-d872f2087c98
* Fix host status bug: jennb@chromium.org2009-12-012-1/+17
| | | | | | | | | | | | * Return DOWNLOADING status for cache without owning group. * Clear out saved notion of status in host on event raised and before swapping cache as those invalidate any saved notion of cache status. TEST=no new tests; covered by existing appcache layout tests BUG=none Review URL: http://codereview.chromium.org/449063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33511 0039d316-1c4b-4281-b951-d872f2087c98
* Mark AppCacheUpdateJobTest.MasterEntryBadManifest test as flaky.willchan@chromium.org2009-12-011-1/+1
| | | | | | | | BUG=http://crbug.com/29072 Review URL: http://codereview.chromium.org/450036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33449 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 449036, which rolled back 402098, and fix the valgrind error that ↵jennb@chromium.org2009-12-016-84/+1103
| | | | | | | | | | | | | | | | | | | | | | | | | caused the original rollback: Revert 33394 (due to valgrind errors) - Appcache update support for pending master entries: Update process issues a URL request to fetch pending master entries. Pending master entry fetch logic kept separate from regular url fetching as this will be the case in the longterm solution. No optimizations to avoid issuing URL request if pending master entry is also listed in the manifest. (simpler) Only optimized to prevent refetching something that has already been successfully fetched. Longterm optimized solution should be to siphon the responses as the master resource is downloaded instead of having the update job issue URL requests. TEST=new tests for update jobs with pending master entries BUG=none Review URL: http://codereview.chromium.org/449039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33410 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 33394 (due to valgrind errors) - Appcache update support for pending ↵willchan@chromium.org2009-12-016-1103/+84
| | | | | | | | | | | | | | | | | | | | | | master entries: Update process issues a URL request to fetch pending master entries. Pending master entry fetch logic kept separate from regular url fetching as this will be the case in the longterm solution. No optimizations to avoid issuing URL request if pending master entry is also listed in the manifest. (simpler) Only optimized to prevent refetching something that has already been successfully fetched. Longterm optimized solution should be to siphon the responses as the master resource is downloaded instead of having the update job issue URL requests. TEST=new tests for update jobs with pending master entries BUG=none Review URL: http://codereview.chromium.org/402098 TBR=jennb@chromium.org Review URL: http://codereview.chromium.org/449036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33405 0039d316-1c4b-4281-b951-d872f2087c98
* Appcache update support for pending master entries: jennb@chromium.org2009-12-016-84/+1103
| | | | | | | | | | | | | | | | | - Update process issues a URL request to fetch pending master entries. - Pending master entry fetch logic kept separate from regular url fetching as this will be the case in the long-term solution. - No optimizations to avoid issuing URL request if pending master entry is also listed in the manifest. (simpler) - Only optimized to prevent refetching something that has already been successfully fetched. Long-term optimized solution should be to siphon the responses as the master resource is downloaded instead of having the update job issue URL requests. TEST=new tests for update jobs with pending master entries BUG=none Review URL: http://codereview.chromium.org/402098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33394 0039d316-1c4b-4281-b951-d872f2087c98
* Remove reference fragments from URL before passing to appcache for use as an ↵jennb@chromium.org2009-11-241-0/+5
| | | | | | | | | | | appcache entry URL. TEST=none BUG=none Review URL: http://codereview.chromium.org/431022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32937 0039d316-1c4b-4281-b951-d872f2087c98
* A mind numbing change to add the notion of a persistent groupId, and to get ↵michaeln@google.com2009-11-2412-61/+93
| | | | | | | | | | | | rid of the notion of an entryId. TEST=existing tests apply BUG=none Review URL: http://codereview.chromium.org/432012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32895 0039d316-1c4b-4281-b951-d872f2087c98
* The appcache system uses two threads, an IO thread and a DB thread.michaeln@google.com2009-11-232-0/+57
| | | | | | | | | | | | | | | It does not create these threads, the embedder is responsible for providing them to the appcache library by implementing the class declared in appcache_thread.h. Also in this CL are two implementations, one for Chrome and another for test_shell. TEST=none BUG=none Review URL: http://codereview.chromium.org/409005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32846 0039d316-1c4b-4281-b951-d872f2087c98
* Forces T*s to scoped_refptr<T> when PostTask()ing to a function expecting ↵jamesr@chromium.org2009-11-201-5/+10
| | | | | | | | scoped_refptr<T> Review URL: http://codereview.chromium.org/418007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32706 0039d316-1c4b-4281-b951-d872f2087c98
* Mock appcache storage bug fix for storing group and changes to its existing ↵jennb@chromium.org2009-11-183-7/+52
| | | | | | | | | | | newest cache. TEST=test added to catch bug BUG=none Review URL: http://codereview.chromium.org/399078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32417 0039d316-1c4b-4281-b951-d872f2087c98
* Isolated bug fixes from CL 385104 to address the following:jennb@chromium.org2009-11-184-28/+97
| | | | | | | | | | | | | | - using references for collections - only getting request response code if request was successful - writing response info for URL fetches that do not contain any data - only bothering with reading/writing response if response code is 2xx TEST=added test and data files to verify empty file still gets response written to storage BUG=none Review URL: http://codereview.chromium.org/385141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32337 0039d316-1c4b-4281-b951-d872f2087c98
* Empty data file needed for a unittest.jennb@chromium.org2009-11-171-0/+0
| | | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32146 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a simple crashing bug, don't assume an associated host has an owning ↵michaeln@google.com2009-11-161-5/+3
| | | | | | | | | | | group. The host can be associated with an incomplete 'inprogress' that has not yet been added to its group. When in this state, we return UNCACHED for the 'status' attribute. TEST=yes, a layout test covers this BUG=none Review URL: http://codereview.chromium.org/395021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32080 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a simple manifest parsing bug.michaeln@google.com2009-11-162-1/+13
| | | | | | | | | TEST=manifest_parser_unittest.cc BUG=none Review URL: http://codereview.chromium.org/400003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32079 0039d316-1c4b-4281-b951-d872f2087c98
* Load manifest data for newest cache from storage to compare against fetched ↵jennb@chromium.org2009-11-133-65/+102
| | | | | | | | | | | manifest. TEST=updated BUG=none Review URL: http://codereview.chromium.org/386013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31918 0039d316-1c4b-4281-b951-d872f2087c98
* * Fix a bug with the applicationCache.status return value. The wrong status ↵michaeln@google.com2009-11-123-5/+22
| | | | | | | | | | | | | value was visible via applicationCache.status after a swap because we sample GetStatus() before swappable_cache_ was cleared out. * Pull the plug on support for file:// urls in DEBUG builds for now. TEST=added to appcache_host_unittest.cc BUG=none Review URL: http://codereview.chromium.org/385071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31818 0039d316-1c4b-4281-b951-d872f2087c98
* Lookup appcached responses given a request URL.michaeln@google.com2009-11-126-28/+538
| | | | | | | | | TEST=new cases in mock_appcache_storage_unittest.cc and appcache_unittest.cc BUG=none Review URL: http://codereview.chromium.org/372070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31757 0039d316-1c4b-4281-b951-d872f2087c98
* Upstreaming WebKit.gypyaar@chromium.org2009-11-123-6/+6
| | | | | | | | | | | | This mega patch contains a few simple but tightly dependent changes: 1. Deletion of webkit/api/WebKit.gyp. The file now lives in webkit.org. 2. Rename of webkit/webkit.gyp to webkit/webkit_glue.gyp. Having two webkit.gyp was a source of developer confusion. 3. Gyp dependencies are updated across chromium to point at the upstream WebKit.gyp and the renamed webkit_glue.gyp. 4. Some 200+ files include paths fixed to point to third_party/WebKit/WebKit/chromium instead of webkit/api. The later will be deleted in a subsequent patch. Review URL: http://codereview.chromium.org/387020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31749 0039d316-1c4b-4281-b951-d872f2087c98
* Change store group and newest cache API so that storage failure does not ↵jennb@chromium.org2009-11-118-45/+18
| | | | | | | | require storage clients to revert changes to group and so it's not racey.TEST=existing tests updatedBUG=none Review URL: http://codereview.chromium.org/384029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31730 0039d316-1c4b-4281-b951-d872f2087c98
* applicationCache.swap(), applicationCache.update() and ↵michaeln@google.com2009-11-102-11/+53
| | | | | | | | | | | applicationCache.status scriptable API impls TEST=manual and existing unittests BUG=none Review URL: http://codereview.chromium.org/379003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31536 0039d316-1c4b-4281-b951-d872f2087c98
* Valgrind fixmichaeln@google.com2009-11-091-1/+2
| | | | | | | | | TEST: none BUG: none TBR: jennb git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31413 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache changes to the networking model. Added new classes ↵michaeln@google.com2009-11-0919-82/+2227
| | | | | | | | | | AppCacheRequestHandler and AppCacheURLRequestJob. TEST=appcache_url_request_job_unittest.cc, appcache_request_handler_unittest.cc BUG=none Review URL: http://codereview.chromium.org/338034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31411 0039d316-1c4b-4281-b951-d872f2087c98
* Third patch in making destructors of refcounted objects private.jam@chromium.org2009-11-056-8/+26
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/363023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31169 0039d316-1c4b-4281-b951-d872f2087c98
* Add storage code to appcache update process.jennb@chromium.org2009-10-307-84/+467
| | | | | | | | | | | Add storage API for simulating storage errors. TEST=verify appcache update wrote to storage correctly BUG=none Review URL: http://codereview.chromium.org/326002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30612 0039d316-1c4b-4281-b951-d872f2087c98
* MockAppCacheStorage implementionmichaeln@google.com2009-10-248-147/+689
| | | | | | | | | | | | | | | | | | | | | | This is a quick and easy 'mock' implementation of the storage interface that doesn't put anything to disk. We simply add an extra reference to objects when they're put in storage, and remove the extra reference when they are removed from storage. Responses are never really removed from the in-memory disk cache. Delegate callbacks are made asyncly to appropiately mimic what will happen with a real disk-backed storage impl that involves IO on a background thread. This is for use in unit tests and to initially bring up the appcache related layout tests. TEST=mock_appcache_storage_unittest.cc BUG=none Review URL: http://codereview.chromium.org/300043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30017 0039d316-1c4b-4281-b951-d872f2087c98
* Some more, release link error fixmichaeln@google.com2009-10-211-5/+7
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29676 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a compile error.michaeln@google.com2009-10-211-5/+3
| | | | | | Review URL: http://codereview.chromium.org/307021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29675 0039d316-1c4b-4281-b951-d872f2087c98
* AppCacheResponse storage implementationmichaeln@google.com2009-10-2111-115/+1375
| | | | | | | | | | | | | | * classes AppCacheResponseReader and AppCacheResponseWriter * also implements AppCacheStorage.LoadResponseInfo() * using a memory-backed disk_cache for now, so not really on disk yet TEST=appcache_response_unittest.cc BUG=none Review URL: http://codereview.chromium.org/269062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29670 0039d316-1c4b-4281-b951-d872f2087c98
* Fix minor style violation.jennb@chromium.org2009-10-161-2/+2
| | | | | | | | | TBR=mark TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29348 0039d316-1c4b-4281-b951-d872f2087c98
* Fix to avoid a bad mem access after URL request has already been deleted.jennb@chromium.org2009-10-162-3/+4
| | | | | | | | | | | Re-enabled tests that may trigger this condition. TEST=no new tests BUG=none Review URL: http://codereview.chromium.org/285006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29340 0039d316-1c4b-4281-b951-d872f2087c98
* Disable a couple appcache update job unittests that may have a ↵jennb@chromium.org2009-10-161-2/+2
| | | | | | | | | | | timing-dependent mem issue. TBR=michaeln TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29303 0039d316-1c4b-4281-b951-d872f2087c98
* Implement cancelling an appcache update. An update is cancelled when its ↵jennb@chromium.org2009-10-1611-139/+302
| | | | | | | | | | | | application cache group is no longer in use. Refcounting of caches and groups changed to make cancelling an update work. TEST=updated existing tests, verify deleting group cancels update, verify new refcounting behavior BUG=none Review URL: http://codereview.chromium.org/274013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29291 0039d316-1c4b-4281-b951-d872f2087c98
* Add some unimplemented methods from my last CL.michaeln@google.com2009-10-133-2/+43
| | | | | | | | | TEST=yes, appcache_storage_unittest.cc BUG=none Review URL: http://codereview.chromium.org/266042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28772 0039d316-1c4b-4281-b951-d872f2087c98