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

Unified Diff: content/public/browser/indexed_db_context.h

Issue 17518004: Move IndexedDB from WEBKIT_DEPRECATED to dedicated thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing files Created 7 years, 6 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
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>;
« content/browser/indexed_db/indexed_db_thread.h ('K') | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698