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

Unified Diff: webkit/appcache/appcache_thread.h

Issue 1115002: Plumbing for providing a cache thread MessageLoop to the DiskCache backend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months 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 | « chrome/browser/appcache/chrome_appcache_service.cc ('k') | webkit/appcache/appcache_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_thread.h
===================================================================
--- webkit/appcache/appcache_thread.h (revision 41894)
+++ webkit/appcache/appcache_thread.h (working copy)
@@ -11,21 +11,27 @@
class Location;
}
+class MessageLoop;
+
namespace appcache {
// The appcache system uses two threads, an IO thread and a DB thread.
// It does not create these threads, the embedder is responsible for
// providing them to the appcache library by providing a concrete
// implementation of the PostTask and CurrentlyOn methods declared here,
-// and by calling the InitIDs method prior to using the appcache library.
+// and by calling the Init method prior to using the appcache library.
+// The disk_cache also requires the embedder to provide a thread message
+// loop.
class AppCacheThread {
public:
- static void InitIDs(int db, int io) {
+ static void Init(int db, int io, MessageLoop* disk_cache_thread) {
rvargas (doing something else) 2010/03/18 22:17:07 I'm sad for the lack of symmetry but I see that th
db_ = db;
io_ = io;
+ disk_cache_thread_ = disk_cache_thread;
}
static int db() { return db_; }
static int io() { return io_; }
+ static MessageLoop* disk_cache_thread() { return disk_cache_thread_; }
static bool PostTask(int id,
const tracked_objects::Location& from_here,
@@ -45,6 +51,7 @@
static int db_;
static int io_;
+ static MessageLoop* disk_cache_thread_;
};
} // namespace appcache
« no previous file with comments | « chrome/browser/appcache/chrome_appcache_service.cc ('k') | webkit/appcache/appcache_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698