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

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: IOS build fix 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
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1d11a9a6cb1915940b7f36817447ac0ef474e5e0 100644
--- a/content/public/browser/indexed_db_context.h
+++ b/content/public/browser/indexed_db_context.h
@@ -13,12 +13,20 @@
#include "content/common/content_export.h"
#include "content/public/browser/indexed_db_info.h"
+namespace base {
+class SequencedTaskRunner;
+class TaskRunner;
+}
+
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 +39,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>;
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698