summaryrefslogtreecommitdiffstats
path: root/webkit/appcache
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-101-3/+4
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache StorageAPIsmichaeln@google.com2009-10-0922-202/+745
| | | | | | | | | TEST=none yet, these are just API definitions stubbed out for now BUG=none Review URL: http://codereview.chromium.org/209071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28513 0039d316-1c4b-4281-b951-d872f2087c98
* Make appcache update job retry 503 requests with retry-after of 0.jennb@chromium.org2009-10-083-20/+353
| | | | | | | | | TEST=test retry logic BUG=none Review URL: http://codereview.chromium.org/264002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28406 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enabling disabled appcache update unittests. Change comparison of cache ↵jennb@chromium.org2009-10-065-25/+55
| | | | | | | | | | | update time. Change manifest-fb-404 entry ordering so all 3 requests always happen regardless of which order the url requests complete in. TEST=none BUG=none Review URL: http://codereview.chromium.org/257065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28174 0039d316-1c4b-4281-b951-d872f2087c98
* Disable some appcache update tests that depend on testserver.jennb@chromium.org2009-10-062-6/+6
| | | | | | | | | | Probably failing due to network timeout. Upped log message to ERROR to get more info. TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28126 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of application cache update algorithm.jennb@chromium.org2009-10-0632-28/+2255
| | | | | | | | | | | Does not include storage nor processing of pending master entries. TEST=verify update functionality BUG=none Review URL: http://codereview.chromium.org/201070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28123 0039d316-1c4b-4281-b951-d872f2087c98
* (More) Copyright housecleaning (i missed one before).michaeln@google.com2009-09-231-1/+1
| | | | | | | | | | TBR=jennb BUG=none TEST=none Review URL: http://codereview.chromium.org/222012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26990 0039d316-1c4b-4281-b951-d872f2087c98
* Copyright housecleaningmichaeln@google.com2009-09-237-7/+7
| | | | | | | | | | TBR=jennb BUG=none TEST=none Review URL: http://codereview.chromium.org/218008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26987 0039d316-1c4b-4281-b951-d872f2087c98
* Fix appcache_service and request_context referencing.michaeln@google.com2009-09-222-10/+12
| | | | | | | | | | | | There is one appcache service per profile and several request context per profile. The profile holds a reference to the appcache service. Those request contexts which are subject to retrieval from appcaches hold a reference to the appcache service too. The appcache service is provided with a pointer back to the 'main' request context, this context is used when updating appcaches. Initialization is a little tricky because profiles can't be used on the IO thread and request contexts can't be used on the UI thread. BUG=22597,22125 TEST=many existing tests exercise profile/context creation Review URL: http://codereview.chromium.org/215024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26844 0039d316-1c4b-4281-b951-d872f2087c98
* Check for supported schemes and examine request methods at key points. We ↵michaeln@google.com2009-09-188-55/+157
| | | | | | | | | | | | | | | | | | | | | | | support http, https, and file (dbg only) URLs for now. * Added IsSchemeSupported, IsMethodSupported and IsMethodAndSchemeSupported helpers, and string constants. * Check for supported schemes and methods during cache selection and during request interception. Must be GET for cache selectino, GET or HEAD for request interception. * Renamed some data members in WebApplicationCacheHostImpl to more closely match naming elsewhere. * Added AppCacheHost::Observer to make life easier. (I like the observer model, and even noticed that the chrome code base has a multi-threaded version too (ala Gears)... nice :) * Switched to using the observer model in AppCacheRequestDispatcher instead of a WeakPtr. One of the observable methods is OnDestructionImminent(host). * Added gyp dependency on the net library BUG=none TEST=none Review URL: http://codereview.chromium.org/205017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26537 0039d316-1c4b-4281-b951-d872f2087c98
* * Fleshed out AppCacheHost class a fair amount, in particular the cache ↵michaeln@google.com2009-09-1521-232/+988
| | | | | | | | | | | | | | | | selection algorithm. * Added some AppCacheHost unit tests. * Introduced AppCacheRequestHandler class, which replaces the clunkyApp CacheInterceptor::ExtraInfo struct. This impl is entirely skeletal stubs for now. TEST=appcache_unittest.cc, but really needs more BUG=none Review URL: http://codereview.chromium.org/192043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26275 0039d316-1c4b-4281-b951-d872f2087c98
* 1) Tell the AppCacheService which request context to use when fetching ↵michaeln@google.com2009-09-152-2/+36
| | | | | | | | | | | | | resources for updates. Done for both chrome and test_shell. The service does not yet take a reference to that context, because the extra reference apparently gives some tests grief. 2) Added methods to generate new storage ids for different object types on the IO thread. BUG=none TEST=none Review URL: http://codereview.chromium.org/195077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26253 0039d316-1c4b-4281-b951-d872f2087c98
* * Add appCacheManifestUrl data member to WebURLResponse, and use it to ↵michaeln@google.com2009-09-081-8/+15
| | | | | | | | | | | | detect 'foreign' entries. * Complete the 'contextID' to 'hostID' renaming since that terminology is now used in webcore ResourceRequest. This patch depends on a corresponding webkit change in the chromium port.https://bugs.webkit.org/show_bug.cgi?id=28960 Review URL: http://codereview.chromium.org/201026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25646 0039d316-1c4b-4281-b951-d872f2087c98
* Change AppCache and AppCacheGroup to be ref counted classes.Adjusted API of ↵jennb@chromium.org2009-09-0210-38/+268
| | | | | | | | framework classes accordingly.Added unittests for appcache framework classes.TEST=verify objects are cleaned up properly, verify api implBUG=none Review URL: http://codereview.chromium.org/179071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25264 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb request interception into the appcache library for both chrome and ↵michaeln@google.com2009-09-018-33/+291
| | | | | | | | | | | | | | | | | | | | | | | | test_shell. AppCache library: * Added AppCacheInterceptor, which is derived from URLRequest::Interceptor. Chrome: * Each UserProfile instantiates a ChromeAppCacheService, which is derived from an appcache library class. * Each ChromeURLRequestContext associated with that profile has a reference to that instance. * ResourceDispatcherHost pokes AppCacheInterceptor when initiating URLRequests and when returning the response head. TestShell: * Added SimpleAppCacheSystem which bundles together appcache lib components for use in a single process with an UI and IO thread. * TestShellWebKit instantiates and initializes an instance of the above, aimed at at temp directory that will get cleaned up when the test run is over. * SimpleResourceLoaderBridge pokes the system when initiating URLRequests and when returning the response head. TEST=none, although many existing tests exercise this stuff BUG=none Review URL: http://codereview.chromium.org/173406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25099 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing newline at end of file.mdm@chromium.org2009-08-311-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/183010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24889 0039d316-1c4b-4281-b951-d872f2087c98
* Skeleton classes for appcache library framework. This is a work in progress. ↵jennb@chromium.org2009-08-269-0/+494
| | | | | | | | | | | | Committing early to allow other code to use these objects, but still need to consider refptrs and add unittests. TEST=none (will add when classes are fleshed out more) BUG=none Review URL: http://codereview.chromium.org/174034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24554 0039d316-1c4b-4281-b951-d872f2087c98
* Retrofit the pre-existing appache message dispatching with the new WebKit ↵michaeln@google.com2009-08-218-0/+526
| | | | | | | | | | | | | APIs and concrete classes defined in our new appcache library, and get rid of the old files. There are many files in the CL, mostly to pickup constant values now defined in our new appcache library, and to reflect a terminilogy change (from 'context' to 'host'). TEST=some existing unit tests apply BUG=none Review URL: http://codereview.chromium.org/170003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24022 0039d316-1c4b-4281-b951-d872f2087c98
* Change the enum style to use MACRO_STYLE rather than kConstant style to be ↵jennb@chromium.org2009-08-201-14/+14
| | | | | | | | | | | consistent with chrome code base. TEST=none BUG=none Review URL: http://codereview.chromium.org/174145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23851 0039d316-1c4b-4281-b951-d872f2087c98
* Some cleanupmichaeln@google.com2009-08-111-1/+1
| | | | | | | | | | | * use full paths in includes BUG=none TEST=none Review URL: http://codereview.chromium.org/165288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23121 0039d316-1c4b-4281-b951-d872f2087c98
* Update manifest parser code to match current HTML5 spec byjennb@chromium.org2009-08-103-26/+46
| | | | | | | | | | | | | adding support for whitelisting all URLs using a wildcard and using namespace in place of URL for fallback and network sections. BUG=none TEST=added checks for wildcard character in all sections Review URL: http://codereview.chromium.org/165151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22972 0039d316-1c4b-4281-b951-d872f2087c98
* Port of WebKit's appcache manifest parser code.michaeln@google.com2009-08-063-163/+501
| | | | | | | | | | | | | | | Added unittests for manifest parser to test_shell_tests. This is a clone of jennb's CL here. http://codereview.chromium.org/160608 TBR=jennb BUG=none TEST=manifest_parser_unittest.cc Review URL: http://codereview.chromium.org/165072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22673 0039d316-1c4b-4281-b951-d872f2087c98
* Import WebKit/WebCore/loader/appcache/ManifestParser.{h,cpp}.darin@chromium.org2009-07-232-0/+239
This initial patch contains no edits except for the chromium header and a brief comment; it is uploaded as a basis for future diffs. Subsequent patches will contain the edits for this port and tests. Patch by Jennifer Braithwaite R=darin TEST=none BUG=none Review URL: http://codereview.chromium.org/159237 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21411 0039d316-1c4b-4281-b951-d872f2087c98