summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_host.cc
Commit message (Collapse)AuthorAgeFilesLines
* Select a more appropiate appcache based on the opener or the parent or the ↵michaeln@google.com2011-04-151-2/+18
| | | | | | | | | | | | | target frame of the new document. The change determines a 'preferred manifest url' in these cases: * <iframe> loading, we prefer the parent frame's manifest url * window.open() loading, we prefer the opener frame's manifest url * href clicking to navigate a frame in place, we prefer the manifest url of the document in the frame when the navigation starts BUG=68479 Review URL: http://codereview.chromium.org/6727006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81801 0039d316-1c4b-4281-b951-d872f2087c98
* Defend against selectCache() being called multiple times. There is a bug ↵michaeln@google.com2011-02-191-20/+2
| | | | | | | | | | | | | | filed upstream to fix the HTML parser such that it won't generate multiple calls to this, but given the complexity of the parser I'm putting this defense directly in the appcache system. BUG=72986,73118 TEST=manually run Poppit Review URL: http://codereview.chromium.org/6546004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75481 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequest URLRequest;tfarina@chromium.org2010-11-301-2/+2
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/5384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67762 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for WKBug 47000: a failure mode given bad content (in an unlikely form). ↵michaeln@chromium.org2010-11-031-2/+10
| | | | | | | | | | | | The error occurs when an html page is put in an appcache as a fallback resource (so it's listed in a fallback section), but it contains a manifest attribute that refers to a different manifest file. The system should mark the resource as foreign and exclude it from main resource loads, but it was failing to do so. The fix is to do that. BUG=WK47000 TEST=http/tests/appcache/foreign-fallback.html Review URL: http://codereview.chromium.org/3529009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64868 0039d316-1c4b-4281-b951-d872f2087c98
* webkit: Append base:: in the StringPrintf calls.tfarina@chromium.org2010-09-291-2/+4
| | | | | | | | | | | (Note: This is a TODO in string_util.h) BUG=None TEST=None Review URL: http://codereview.chromium.org/3404027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60885 0039d316-1c4b-4281-b951-d872f2087c98
* Sending renderer notification when update job finishes (Used to notify cache ↵kkanetkar@chromium.org2010-08-051-15/+30
| | | | | | | | | | | | | | complete). OnCacheSelected() event caches appcache info in appcache host. This info is returned for appcache inspection by devtools. BUG = None TEST = Manual Review URL: http://codereview.chromium.org/3074015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55101 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of changes required to populate appcache resource list.kkanetkar@chromium.org2010-07-281-3/+33
| | | | | | | | | BUG = 2821005 TEST = Manually navigate. Review URL: http://codereview.chromium.org/3009005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53902 0039d316-1c4b-4281-b951-d872f2087c98
* New javascript console logging related to the appcache.michaeln@chromium.org2010-07-141-3/+3
| | | | | | | | | | | | | * Log an error message when an update job results in an error. * Log info messages for progress events and other update status changed events. * Consistently use "Application Cache" in the console messages. TEST=existing unit tests apply for functional correctness, manual testing to see the new console output BUG=none Review URL: http://codereview.chromium.org/2910007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52270 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52072. Pass notifications to the browser on access to the appcache ↵jochen@chromium.org2010-07-121-3/+5
| | | | | | | | | | | | main resource manifest. BUG=45230 TEST=browser_tests TBR=vandebo Review URL: http://codereview.chromium.org/2980001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52074 0039d316-1c4b-4281-b951-d872f2087c98
* Failed compile on Chromium builder dbgvandebo@chromium.org2010-07-121-5/+3
| | | | | | | | | | | | | | Revert 52072 - Pass notifications to the browser on access to the appcache main resource manifest. BUG=45230 TEST=browser_tests Review URL: http://codereview.chromium.org/2808046 TBR=jochen@chromium.org Review URL: http://codereview.chromium.org/2925008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52073 0039d316-1c4b-4281-b951-d872f2087c98
* Pass notifications to the browser on access to the appcache main resource ↵jochen@chromium.org2010-07-121-3/+5
| | | | | | | | | | | manifest. BUG=45230 TEST=browser_tests Review URL: http://codereview.chromium.org/2808046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52072 0039d316-1c4b-4281-b951-d872f2087c98
* Minor AppCache modsmichaeln@chromium.org2010-06-301-1/+14
| | | | | | | | | | | | | | * Add some more logging to the console window for when a cache is first created and when a master entry is added. * Relocate the code that generates the log message for when a document is loaded from an appcache to the browser process. * Use a Singleton<T> instead of a static global for an IDMap<T> used in child processes. * Call the recently added webkit API for reporting progress events. BUG=39370,13685 TEST=some existing automated tests apply, manual tests for the console logging Review URL: http://codereview.chromium.org/2877005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51274 0039d316-1c4b-4281-b951-d872f2087c98
* Finally getting to the appcache parts instead of all of this webkitApi/ipc ↵michaeln@chromium.org2010-05-201-5/+45
| | | | | | | | | | | plumbing craziness. BUG=39368 TEST=new unittests Review URL: http://codereview.chromium.org/2121002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47844 0039d316-1c4b-4281-b951-d872f2087c98
* Indicate in the tab UI if appcache creation was blocked by privacy settings.jochen@chromium.org2010-04-091-1/+13
| | | | | | | | | TEST=manual BUG=38362 Review URL: http://codereview.chromium.org/1600002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44079 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the content settings UI to the appcache.michaeln@chromium.org2010-03-051-6/+8
| | | | | | | | | | | | | * Populate the tree view with appcaches * Delete selected appcaches from the tree view * Delete the date range indicated in the browsing data remover TEST=manual BUG=34634 Review URL: http://codereview.chromium.org/660423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40796 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Reduce header dependencies in webkitphajdan.jr@chromium.org2010-02-091-0/+1
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/582015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38461 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most uses of EmptyString(), EmptyWString(), EmptyString16(), and ↵pkasting@chromium.org2010-01-081-5/+5
| | | | | | | | | | EmptyGURL(), since the code in question can just use the default constructor. BUG=none TEST=none Review URL: http://codereview.chromium.org/517054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35766 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to address the failing appcache/remove-cache.html layout tests.michaeln@chromium.org2010-01-041-2/+5
| | | | | | | | | 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
* AppCacheDatabase and SQL based AppCacheStorageImpl. michaeln@chromium.org2009-12-291-0/+2
| | | | | | | | | | | | | | | 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-291-2/+0
| | | | | | | | | | | | | | | | | | 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-291-0/+2
| | | | | | | | | | | | | | | 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
* Fix host status bug: jennb@chromium.org2009-12-011-1/+6
| | | | | | | | | | | | * 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
* 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 bug with the applicationCache.status return value. The wrong status ↵michaeln@google.com2009-11-121-2/+1
| | | | | | | | | | | | | 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
* applicationCache.swap(), applicationCache.update() and ↵michaeln@google.com2009-11-101-11/+50
| | | | | | | | | | | 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-091-9/+20
| | | | | | | | | | 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
* Implement cancelling an appcache update. An update is cancelled when its ↵jennb@chromium.org2009-10-161-8/+30
| | | | | | | | | | | | 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
* AppCache StorageAPIsmichaeln@google.com2009-10-091-8/+10
| | | | | | | | | 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
* Check for supported schemes and examine request methods at key points. We ↵michaeln@google.com2009-09-181-5/+20
| | | | | | | | | | | | | | | | | | | | | | | 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-151-13/+234
| | | | | | | | | | | | | | | | 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
* Change AppCache and AppCacheGroup to be ref counted classes.Adjusted API of ↵jennb@chromium.org2009-09-021-4/+20
| | | | | | | | 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
* Skeleton classes for appcache library framework. This is a work in progress. ↵jennb@chromium.org2009-08-261-0/+25
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