Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: webkit/tools/test_shell/simple_appcache_system.cc

Issue 4303003: Get rid of a dependency on MessageLoop::DestructionObserver.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/simple_appcache_system.cc
===================================================================
--- webkit/tools/test_shell/simple_appcache_system.cc (revision 65856)
+++ webkit/tools/test_shell/simple_appcache_system.cc (working copy)
@@ -390,7 +390,6 @@
DCHECK(!io_message_loop_);
io_message_loop_ = MessageLoop::current();
- io_message_loop_->AddDestructionObserver(this);
if (!db_thread_.IsRunning())
db_thread_.Start();
@@ -406,6 +405,19 @@
AppCacheInterceptor::EnsureRegistered();
}
+void SimpleAppCacheSystem::CleanupIOThread() {
+ DCHECK(is_io_thread());
+
+ 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();
+}
+
WebApplicationCacheHost* SimpleAppCacheSystem::CreateCacheHostForWebKit(
WebApplicationCacheHostClient* client) {
if (!is_initailized_on_ui_thread())
@@ -438,16 +450,3 @@
request, cache_id, manifest_url);
}
}
-
-void SimpleAppCacheSystem::WillDestroyCurrentMessageLoop() {
- DCHECK(is_io_thread());
-
- 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();
-}
« no previous file with comments | « webkit/tools/test_shell/simple_appcache_system.h ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698