Chromium Code Reviews| 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..c4580ca108f7ce664a4d0355509837df3ee4ec91 100644 |
| --- a/content/public/browser/indexed_db_context.h |
| +++ b/content/public/browser/indexed_db_context.h |
| @@ -10,15 +10,20 @@ |
| #include "base/basictypes.h" |
| #include "base/files/file_path.h" |
| #include "base/memory/ref_counted.h" |
| +#include "base/sequenced_task_runner.h" |
| +#include "base/task_runner.h" |
|
jam
2013/06/21 19:41:59
nit: you don't need these two methods, right? you
jsbell
2013/06/21 20:37:14
Done.
|
| #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() const = 0; |
| + |
| // Methods used in response to QuotaManager requests. |
| virtual std::vector<GURL> GetAllOrigins() = 0; |
| virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() = 0; |
| @@ -31,6 +36,9 @@ 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; |
| + // Set the task runner for tests if browser main loop is not initialized. |
| + virtual void SetTaskRunnerForTesting( |
| + base::SequencedTaskRunner* task_runner) = 0; |
| protected: |
| friend class base::RefCountedThreadSafe<IndexedDBContext>; |