diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 22:43:19 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 22:43:19 +0000 |
commit | e5390a4d7d04cf148ace753239662a1bb32e5e4a (patch) | |
tree | 53192f394861d20aa36f80a96ced884f4ae3893d /chrome/worker | |
parent | fdb244d98291c7f801bb0a36c06de4a71b4895ae (diff) | |
download | chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.zip chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.tar.gz chromium_src-e5390a4d7d04cf148ace753239662a1bb32e5e4a.tar.bz2 |
Fully connect the dots between workers and appcache resource loading.
* Split WorkerService CreateWorker into distinct methods for 'shared' vs 'dedicated' workers.
* Include additional appcache params in WorkerService CreateSharedWorker and CreateDedicatedWorker methods.
* Store those additional params in WorkerInstance object.
* Pass those additional params to the worker process.
* Use those additional params when initiating the appcache host for the worker when calling SelectCacheForWorker and SelectCacheForSharedWorker.
* Add browser process message handlers and dispatching for the SelectCacheForWorker and SelectCacheForSharedWorker IPC messages.
* Runtime enable the appcache feature in the worker processes.
BUG=39368
TEST=manual for now, but i need to create layout tests for this
Review URL: http://codereview.chromium.org/2238001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/worker')
-rw-r--r-- | chrome/worker/worker_thread.cc | 4 | ||||
-rw-r--r-- | chrome/worker/worker_webapplicationcachehost_impl.cc | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc index 3e4a1d1..4048f8a 100644 --- a/chrome/worker/worker_thread.cc +++ b/chrome/worker/worker_thread.cc @@ -42,9 +42,7 @@ WorkerThread::WorkerThread() { WebKit::WebRuntimeFeatures::enableDatabase( !command_line.HasSwitch(switches::kDisableDatabases)); - // TODO(michaeln): Enable once the browser process is ready to receive - // the appcache messages. - WebKit::WebRuntimeFeatures::enableApplicationCache(false && + WebKit::WebRuntimeFeatures::enableApplicationCache( !command_line.HasSwitch(switches::kDisableApplicationCache)); #if defined(OS_WIN) diff --git a/chrome/worker/worker_webapplicationcachehost_impl.cc b/chrome/worker/worker_webapplicationcachehost_impl.cc index 1778595..dafa1ea 100644 --- a/chrome/worker/worker_webapplicationcachehost_impl.cc +++ b/chrome/worker/worker_webapplicationcachehost_impl.cc @@ -13,6 +13,11 @@ WorkerWebApplicationCacheHostImpl::WorkerWebApplicationCacheHostImpl( WebKit::WebApplicationCacheHostClient* client) : WebApplicationCacheHostImpl(client, WorkerThread::current()->appcache_dispatcher()->backend_proxy()) { - // TODO(michaeln): Send a worker specific init message. - // backend_->SelectCacheForWorker(init_info); + if (init_info.is_shared_worker) + backend()->SelectCacheForSharedWorker(host_id(), + init_info.main_resource_appcache_id); + else + backend()->SelectCacheForWorker(host_id(), + init_info.parent_process_id, + init_info.parent_appcache_host_id); } |