diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 03:09:28 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 03:09:28 +0000 |
commit | 5ac84ca4f92eea80f31b5c7a58e41e35657a69ab (patch) | |
tree | 8ddff436018b9628878fc5b0871060dd5dba93c2 /webkit/tools/test_shell/simple_appcache_system.cc | |
parent | 79ab45adb441cf439515b0a80c6e546b5cb5c2cd (diff) | |
download | chromium_src-5ac84ca4f92eea80f31b5c7a58e41e35657a69ab.zip chromium_src-5ac84ca4f92eea80f31b5c7a58e41e35657a69ab.tar.gz chromium_src-5ac84ca4f92eea80f31b5c7a58e41e35657a69ab.tar.bz2 |
AppCacheDatabase and SQL based AppCacheStorageImpl.
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
Diffstat (limited to 'webkit/tools/test_shell/simple_appcache_system.cc')
-rw-r--r-- | webkit/tools/test_shell/simple_appcache_system.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc index 0f9d452..e714267 100644 --- a/webkit/tools/test_shell/simple_appcache_system.cc +++ b/webkit/tools/test_shell/simple_appcache_system.cc @@ -26,6 +26,10 @@ bool AppCacheThread::PostTask( int id, const tracked_objects::Location& from_here, Task* task) { + if (SimpleAppCacheSystem::thread_provider()) { + return SimpleAppCacheSystem::thread_provider()->PostTask( + id, from_here, task); + } scoped_ptr<Task> task_ptr(task); MessageLoop* loop = SimpleAppCacheSystem::GetMessageLoop(id); if (loop) @@ -34,6 +38,8 @@ bool AppCacheThread::PostTask( } bool AppCacheThread::CurrentlyOn(int id) { + if (SimpleAppCacheSystem::thread_provider()) + return SimpleAppCacheSystem::thread_provider()->CurrentlyOn(id); return MessageLoop::current() == SimpleAppCacheSystem::GetMessageLoop(id); } @@ -268,7 +274,8 @@ SimpleAppCacheSystem::SimpleAppCacheSystem() backend_proxy_(new SimpleBackendProxy(this))), ALLOW_THIS_IN_INITIALIZER_LIST( frontend_proxy_(new SimpleFrontendProxy(this))), - backend_impl_(NULL), service_(NULL), db_thread_("AppCacheDBThread") { + backend_impl_(NULL), service_(NULL), db_thread_("AppCacheDBThread"), + thread_provider_(NULL) { DCHECK(!instance_); instance_ = this; } @@ -346,11 +353,11 @@ void SimpleAppCacheSystem::WillDestroyCurrentMessageLoop() { DCHECK(is_io_thread()); DCHECK(backend_impl_->hosts().empty()); - io_message_loop_ = NULL; delete backend_impl_; delete service_; backend_impl_ = NULL; service_ = NULL; + io_message_loop_ = NULL; // Just in case the main thread is waiting on it. backend_proxy_->SignalEvent(); |