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

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

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
« no previous file with comments | « no previous file | webkit/tools/test_shell/simple_appcache_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_appcache_system.h
===================================================================
--- webkit/tools/test_shell/simple_appcache_system.h (revision 65856)
+++ webkit/tools/test_shell/simple_appcache_system.h (working copy)
@@ -28,7 +28,7 @@
// a UI thread on which webkit runs and an IO thread on which URLRequests
// are handled. This class conspires with SimpleResourceLoaderBridge to
// retrieve resources from the appcache.
-class SimpleAppCacheSystem : public MessageLoop::DestructionObserver {
+class SimpleAppCacheSystem {
public:
// Should be instanced somewhere in main(). If not instanced, the public
// static methods are all safe no-ops.
@@ -51,6 +51,11 @@
instance_->InitOnIOThread(request_context);
}
+ static void CleanupOnIOThread() {
+ if (instance_)
+ instance_->CleanupIOThread();
+ }
+
// Called by TestShellWebKitInit to manufacture a 'host' for webcore.
static WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
WebKit::WebApplicationCacheHostClient* client) {
@@ -108,6 +113,7 @@
// Instance methods called by our static public methods
void InitOnUIThread(const FilePath& cache_directory);
void InitOnIOThread(URLRequestContext* request_context);
+ void CleanupIOThread();
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
WebKit::WebApplicationCacheHostClient* client);
void SetExtraRequestBits(URLRequest* request,
@@ -139,9 +145,6 @@
return NULL;
}
- // IOThread DestructionObserver
- virtual void WillDestroyCurrentMessageLoop();
-
FilePath cache_directory_;
MessageLoop* io_message_loop_;
MessageLoop* ui_message_loop_;
« no previous file with comments | « no previous file | webkit/tools/test_shell/simple_appcache_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698