Index: content/public/browser/indexed_db_context.h |
diff --git a/content/public/browser/indexed_db_context.h b/content/public/browser/indexed_db_context.h |
index 0f7127d03ee17ba54ae7e4c65fd3c2d1d843c4f2..bda93f7ecb901a2c0b91cda9ee7778ecc67a0aec 100644 |
--- a/content/public/browser/indexed_db_context.h |
+++ b/content/public/browser/indexed_db_context.h |
@@ -10,15 +10,22 @@ |
#include "base/basictypes.h" |
#include "base/files/file_path.h" |
#include "base/memory/ref_counted.h" |
+#include "base/message_loop.h" |
+#include "base/task_runner.h" |
#include "content/common/content_export.h" |
#include "content/public/browser/indexed_db_info.h" |
namespace content { |
// Represents the per-BrowserContext IndexedDB data. |
-// Call these methods only on the WebKit thread. |
+// Call these methods only via the exposed TaskRunner. |
class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> { |
public: |
+ // Only call the below methods by posting to this TaskRunner. |
+ virtual base::TaskRunner* TaskRunner() = 0; |
+ // For callers to DCHECK that they are on the right thread. |
+ virtual bool OnIndexedDBThread() const = 0; |
+ |
// Methods used in response to QuotaManager requests. |
virtual std::vector<GURL> GetAllOrigins() = 0; |
virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() = 0; |
@@ -31,6 +38,7 @@ class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> { |
// Get the file name of the local storage file for the given origin. |
virtual base::FilePath GetFilePathForTesting( |
const std::string& origin_id) const = 0; |
+ virtual void SetMessageLoopForTesting(base::MessageLoop* message_loop) = 0; |
protected: |
friend class base::RefCountedThreadSafe<IndexedDBContext>; |