Index: content/browser/indexed_db/indexed_db_factory.h |
diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h |
index b143853a3a0c3150e7c04c35a3304aee244f04b3..d06cb8291359c7cd2a8a3020c7b6d65bc626d2a1 100644 |
--- a/content/browser/indexed_db/indexed_db_factory.h |
+++ b/content/browser/indexed_db/indexed_db_factory.h |
@@ -18,6 +18,14 @@ |
#include "content/common/content_export.h" |
#include "url/gurl.h" |
+namespace base { |
+class TaskRunner; |
+} |
+ |
+namespace net { |
+class URLRequestContext; |
+} |
+ |
namespace content { |
class IndexedDBBackingStore; |
@@ -28,26 +36,31 @@ class CONTENT_EXPORT IndexedDBFactory |
public: |
explicit IndexedDBFactory(IndexedDBContextImpl* context); |
- // Notifications from weak pointers. |
void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier, |
const GURL& origin_url, |
bool forcedClose); |
void GetDatabaseNames(scoped_refptr<IndexedDBCallbacks> callbacks, |
const GURL& origin_url, |
- const base::FilePath& data_directory); |
+ const base::FilePath& data_directory, |
+ base::TaskRunner* task_runner); |
void Open(const string16& name, |
int64 version, |
+ net::URLRequestContext* request_context, |
int64 transaction_id, |
scoped_refptr<IndexedDBCallbacks> callbacks, |
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, |
const GURL& origin_url, |
- const base::FilePath& data_directory); |
+ const base::FilePath& data_directory, |
+ int child_process_id, |
+ base::TaskRunner* task_runner); |
void DeleteDatabase(const string16& name, |
+ net::URLRequestContext* request_context, |
scoped_refptr<IndexedDBCallbacks> callbacks, |
const GURL& origin_url, |
- const base::FilePath& data_directory); |
+ const base::FilePath& data_directory, |
+ base::TaskRunner* task_runner); |
void HandleBackingStoreFailure(const GURL& origin_url); |
@@ -60,6 +73,9 @@ class CONTENT_EXPORT IndexedDBFactory |
// Called by the IndexedDBContext destructor so the factory can do cleanup. |
void ContextDestroyed(); |
+ // Called by the IndexedDBActiveBlobRegistry. |
+ void ReportOutstandingBlobs(const GURL& origin_url, bool blobs_outstanding); |
+ |
protected: |
friend class base::RefCountedThreadSafe<IndexedDBFactory>; |
@@ -68,12 +84,25 @@ class CONTENT_EXPORT IndexedDBFactory |
virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore( |
const GURL& origin_url, |
const base::FilePath& data_directory, |
+ net::URLRequestContext* request_context, |
blink::WebIDBDataLoss* data_loss, |
std::string* data_loss_reason, |
- bool* disk_full); |
+ bool* disk_full, |
+ base::TaskRunner* task_runner); |
+ |
+ virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStoreHelper( |
+ const GURL& origin_url, |
+ const base::FilePath& data_directory, |
+ net::URLRequestContext* request_context, |
+ blink::WebIDBDataLoss* data_loss, |
+ std::string* data_loss_message, |
+ bool* disk_full, |
+ base::TaskRunner* task_runner, |
+ bool first_time); |
void ReleaseBackingStore(const GURL& origin_url, bool immediate); |
void CloseBackingStore(const GURL& origin_url); |
+ IndexedDBContextImpl* context() const { return context_; } |
private: |
// Called internally after a database is closed, with some delay. If this |
@@ -92,6 +121,8 @@ class CONTENT_EXPORT IndexedDBFactory |
IndexedDBBackingStoreMap backing_store_map_; |
std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; |
+ IndexedDBBackingStoreMap backing_stores_with_active_blobs_; |
+ std::set<GURL> backends_opened_since_boot_; |
}; |
} // namespace content |