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

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

Issue 2172863002: [IndexedDB]: Passing URLRequestContextGetter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few missed merge conflicts. 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_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index af11223de4649bb46aba4116a42c223230f77c1e..a63acc8e9680cc4834cc7120369923f18ed2f003 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -24,7 +24,6 @@
#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
#include "content/browser/indexed_db/indexed_db_metadata.h"
#include "content/browser/indexed_db/indexed_db_observation.h"
-#include "content/browser/indexed_db/indexed_db_observation.h"
#include "content/browser/indexed_db/indexed_db_observer_changes.h"
#include "content/browser/indexed_db/indexed_db_pending_connection.h"
#include "content/browser/indexed_db/indexed_db_value.h"
@@ -62,22 +61,6 @@ IndexedDBDispatcherHost::IndexedDBDispatcherHost(
ChromeBlobStorageContext* blob_storage_context)
: BrowserMessageFilter(IndexedDBMsgStart),
request_context_getter_(request_context_getter),
- request_context_(NULL),
- indexed_db_context_(indexed_db_context),
- blob_storage_context_(blob_storage_context),
- database_dispatcher_host_(base::MakeUnique<DatabaseDispatcherHost>(this)),
- cursor_dispatcher_host_(base::MakeUnique<CursorDispatcherHost>(this)),
- ipc_process_id_(ipc_process_id) {
- DCHECK(indexed_db_context_.get());
-}
-
-IndexedDBDispatcherHost::IndexedDBDispatcherHost(
- int ipc_process_id,
- net::URLRequestContext* request_context,
- IndexedDBContextImpl* indexed_db_context,
- ChromeBlobStorageContext* blob_storage_context)
- : BrowserMessageFilter(IndexedDBMsgStart),
- request_context_(request_context),
indexed_db_context_(indexed_db_context),
blob_storage_context_(blob_storage_context),
database_dispatcher_host_(base::MakeUnique<DatabaseDispatcherHost>(this)),
@@ -88,17 +71,6 @@ IndexedDBDispatcherHost::IndexedDBDispatcherHost(
IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {}
-void IndexedDBDispatcherHost::OnChannelConnected(int32_t peer_pid) {
- BrowserMessageFilter::OnChannelConnected(peer_pid);
-
- if (request_context_getter_.get()) {
- DCHECK(!request_context_);
- request_context_ = request_context_getter_->GetURLRequestContext();
- request_context_getter_ = NULL;
- DCHECK(request_context_);
- }
-}
-
void IndexedDBDispatcherHost::OnChannelClosing() {
bool success = indexed_db_context_->TaskRunner()->PostTask(
FROM_HERE,
@@ -349,7 +321,7 @@ void IndexedDBDispatcherHost::OnIDBFactoryGetDatabaseNames(
context()->GetIDBFactory()->GetDatabaseNames(
new IndexedDBCallbacks(this, params.ipc_thread_id,
params.ipc_callbacks_id),
- params.origin, indexed_db_path, request_context_);
+ params.origin, indexed_db_path, request_context_getter_);
}
void IndexedDBDispatcherHost::OnIDBFactoryOpen(
@@ -379,9 +351,9 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen(
base::MakeUnique<IndexedDBPendingConnection>(
callbacks, database_callbacks, ipc_process_id_, host_transaction_id,
params.version);
- DCHECK(request_context_);
+ DCHECK(request_context_getter_);
context()->GetIDBFactory()->Open(params.name, std::move(connection),
- request_context_, params.origin,
+ request_context_getter_, params.origin,
indexed_db_path);
}
@@ -395,9 +367,9 @@ void IndexedDBDispatcherHost::OnIDBFactoryDeleteDatabase(
}
base::FilePath indexed_db_path = indexed_db_context_->data_path();
- DCHECK(request_context_);
+ DCHECK(request_context_getter_);
context()->GetIDBFactory()->DeleteDatabase(
- params.name, request_context_,
+ params.name, request_context_getter_,
new IndexedDBCallbacks(this, params.ipc_thread_id,
params.ipc_callbacks_id),
params.origin, indexed_db_path);
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.h ('k') | content/browser/indexed_db/indexed_db_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698