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

Unified Diff: content/browser/indexed_db/indexed_db_context_impl.cc

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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/browser/indexed_db/indexed_db_context_impl.cc
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index bfa84ea27ba815222bd431a9d6181f18cc8c7137..6f27afcefcb541a992a414a36fb7243b64282cdf 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -21,9 +21,9 @@
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "content/browser/browser_main_loop.h"
+#include "content/browser/indexed_db/database_factory_impl.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
#include "content/browser/indexed_db/indexed_db_database.h"
-#include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
#include "content/browser/indexed_db/indexed_db_factory_impl.h"
#include "content/browser/indexed_db/indexed_db_quota_client.h"
#include "content/browser/indexed_db/indexed_db_tracing.h"
@@ -109,8 +109,9 @@ IndexedDBContextImpl::IndexedDBContextImpl(
const base::FilePath& data_path,
storage::SpecialStoragePolicy* special_storage_policy,
storage::QuotaManagerProxy* quota_manager_proxy,
- base::SequencedTaskRunner* task_runner)
- : force_keep_session_state_(false),
+ base::SingleThreadTaskRunner* task_runner)
+ : mojo_factory_(nullptr),
+ force_keep_session_state_(false),
special_storage_policy_(special_storage_policy),
quota_manager_proxy_(quota_manager_proxy),
task_runner_(task_runner) {
@@ -131,6 +132,10 @@ IndexedDBFactory* IndexedDBContextImpl::GetIDBFactory() {
return factory_.get();
}
+storage::QuotaManagerProxy* IndexedDBContextImpl::quota_manager_proxy() const {
+ return quota_manager_proxy_.get();
+}
+
std::vector<Origin> IndexedDBContextImpl::GetAllOrigins() {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
std::set<Origin>* origins_set = GetOriginSet();
@@ -160,6 +165,7 @@ static bool HostNameComparator(const Origin& i, const Origin& j) {
return i.host() < j.host();
}
+#if 0
base::ListValue* IndexedDBContextImpl::GetAllOriginsDetails() {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
std::vector<Origin> origins = GetAllOrigins();
@@ -278,6 +284,7 @@ base::ListValue* IndexedDBContextImpl::GetAllOriginsDetails() {
}
return list.release();
}
+#endif
int IndexedDBContextImpl::GetOriginBlobFileCount(const Origin& origin) {
DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
@@ -430,7 +437,7 @@ base::FilePath IndexedDBContextImpl::GetFilePathForTesting(
}
void IndexedDBContextImpl::SetTaskRunnerForTesting(
- base::SequencedTaskRunner* task_runner) {
+ base::SingleThreadTaskRunner* task_runner) {
DCHECK(!task_runner_.get());
task_runner_ = task_runner;
}
@@ -571,7 +578,7 @@ void IndexedDBContextImpl::ResetCaches() {
origin_size_map_.clear();
}
-base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const {
+base::SingleThreadTaskRunner* IndexedDBContextImpl::TaskRunner() const {
return task_runner_.get();
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.h ('k') | content/browser/indexed_db/indexed_db_cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698