| Index: content/browser/indexed_db/indexed_db_context_impl.h
|
| diff --git a/content/browser/indexed_db/indexed_db_context_impl.h b/content/browser/indexed_db/indexed_db_context_impl.h
|
| index f03c7a92612d6c0f9a2219088772d9075bfdbf84..8c1663e08e1349f847c331b0ce2e00ef910769ab 100644
|
| --- a/content/browser/indexed_db/indexed_db_context_impl.h
|
| +++ b/content/browser/indexed_db/indexed_db_context_impl.h
|
| @@ -14,6 +14,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "Source/modules/indexeddb/indexed_db.mojom.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/files/file_path.h"
|
| #include "base/gtest_prod_util.h"
|
| @@ -27,7 +28,7 @@
|
| namespace base {
|
| class ListValue;
|
| class FilePath;
|
| -class SequencedTaskRunner;
|
| +class SingleThreadTaskRunner;
|
| }
|
|
|
| namespace storage {
|
| @@ -41,7 +42,10 @@ class Origin;
|
|
|
| namespace content {
|
|
|
| +class BrowserContext;
|
| +class DatabaseFactoryImpl;
|
| class IndexedDBConnection;
|
| +class DatabaseFactoryImpl;
|
|
|
| class CONTENT_EXPORT IndexedDBContextImpl
|
| : NON_EXPORTED_BASE(public IndexedDBContext) {
|
| @@ -62,7 +66,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
|
| IndexedDBContextImpl(const base::FilePath& data_path,
|
| storage::SpecialStoragePolicy* special_storage_policy,
|
| storage::QuotaManagerProxy* quota_manager_proxy,
|
| - base::SequencedTaskRunner* task_runner);
|
| + base::SingleThreadTaskRunner* task_runner);
|
|
|
| IndexedDBFactory* GetIDBFactory();
|
|
|
| @@ -70,14 +74,16 @@ class CONTENT_EXPORT IndexedDBContextImpl
|
| void SetForceKeepSessionState() { force_keep_session_state_ = true; }
|
|
|
| // IndexedDBContext implementation:
|
| - base::SequencedTaskRunner* TaskRunner() const override;
|
| + base::SingleThreadTaskRunner* TaskRunner() const override;
|
| std::vector<IndexedDBInfo> GetAllOriginsInfo() override;
|
| int64_t GetOriginDiskUsage(const GURL& origin_url) override;
|
| void DeleteForOrigin(const GURL& origin_url) override;
|
| void CopyOriginData(const GURL& origin_url,
|
| IndexedDBContext* dest_context) override;
|
| base::FilePath GetFilePathForTesting(const GURL& origin_url) const override;
|
| - void SetTaskRunnerForTesting(base::SequencedTaskRunner* task_runner) override;
|
| + void SetTaskRunnerForTesting(
|
| + base::SingleThreadTaskRunner* task_runner) override;
|
| + void TransactionComplete(const url::Origin& origin) override;
|
|
|
| // TODO(jsbell): Replace IndexedDBContext members with these.
|
| int64_t GetOriginDiskUsage(const url::Origin& origin);
|
| @@ -89,23 +95,22 @@ class CONTENT_EXPORT IndexedDBContextImpl
|
| // Methods called by IndexedDBDispatcherHost for quota support.
|
| void ConnectionOpened(const url::Origin& origin, IndexedDBConnection* db);
|
| void ConnectionClosed(const url::Origin& origin, IndexedDBConnection* db);
|
| - void TransactionComplete(const url::Origin& origin);
|
| void DatabaseDeleted(const url::Origin& origin);
|
|
|
| static base::FilePath GetBlobStoreFileName(const url::Origin& origin);
|
| static base::FilePath GetLevelDBFileName(const url::Origin& origin);
|
|
|
| // Will be null in unit tests.
|
| - storage::QuotaManagerProxy* quota_manager_proxy() const {
|
| - return quota_manager_proxy_.get();
|
| - }
|
| + storage::QuotaManagerProxy* quota_manager_proxy() const override;
|
|
|
| // Returns a list of all origins with backing stores.
|
| std::vector<url::Origin> GetAllOrigins();
|
| bool HasOrigin(const url::Origin& origin);
|
|
|
| // Used by IndexedDBInternalsUI to populate internals page.
|
| +#if 0
|
| base::ListValue* GetAllOriginsDetails();
|
| +#endif
|
|
|
| // ForceClose takes a value rather than a reference since it may release the
|
| // owning object.
|
| @@ -125,6 +130,9 @@ class CONTENT_EXPORT IndexedDBContextImpl
|
|
|
| bool is_incognito() const { return data_path_.empty(); }
|
|
|
| + void Bind(
|
| + mojo::InterfaceRequest<::indexed_db::mojom::DatabaseFactory> request);
|
| +
|
| protected:
|
| ~IndexedDBContextImpl() override;
|
|
|
| @@ -157,12 +165,13 @@ class CONTENT_EXPORT IndexedDBContextImpl
|
| void ResetCaches();
|
|
|
| scoped_refptr<IndexedDBFactory> factory_;
|
| + DatabaseFactoryImpl* mojo_factory_;
|
| base::FilePath data_path_;
|
| // If true, nothing (not even session-only data) should be deleted on exit.
|
| bool force_keep_session_state_;
|
| scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
|
| scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
|
| - scoped_refptr<base::SequencedTaskRunner> task_runner_;
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
|
| std::unique_ptr<std::set<url::Origin>> origin_set_;
|
| std::map<url::Origin, int64_t> origin_size_map_;
|
|
|
|
|