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

Side by Side Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 2784003002: [IndexedDB] Mojo testing harness. (Closed)
Patch Set: Working! Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 blob_storage_context_(std::move(blob_storage_context)), 77 blob_storage_context_(std::move(blob_storage_context)),
78 idb_runner_(indexed_db_context_->TaskRunner()), 78 idb_runner_(indexed_db_context_->TaskRunner()),
79 ipc_process_id_(ipc_process_id), 79 ipc_process_id_(ipc_process_id),
80 weak_factory_(this) { 80 weak_factory_(this) {
81 // Can be null in unittests. 81 // Can be null in unittests.
82 idb_helper_ = idb_runner_ 82 idb_helper_ = idb_runner_
83 ? new IDBThreadHelper(ipc_process_id_, 83 ? new IDBThreadHelper(ipc_process_id_,
84 std::move(request_context_getter), 84 std::move(request_context_getter),
85 indexed_db_context_) 85 indexed_db_context_)
86 : nullptr; 86 : nullptr;
87 DCHECK(idb_helper_);
87 DCHECK(indexed_db_context_.get()); 88 DCHECK(indexed_db_context_.get());
88 } 89 }
89 90
90 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() { 91 IndexedDBDispatcherHost::~IndexedDBDispatcherHost() {
91 if (idb_helper_) 92 if (idb_helper_)
92 idb_runner_->DeleteSoon(FROM_HERE, idb_helper_); 93 idb_runner_->DeleteSoon(FROM_HERE, idb_helper_);
93 } 94 }
94 95
95 void IndexedDBDispatcherHost::AddBinding( 96 void IndexedDBDispatcherHost::AddBinding(
96 ::indexed_db::mojom::FactoryAssociatedRequest request) { 97 ::indexed_db::mojom::FactoryAssociatedRequest request) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 278 DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
278 279
279 base::FilePath indexed_db_path = indexed_db_context_->data_path(); 280 base::FilePath indexed_db_path = indexed_db_context_->data_path();
280 DCHECK(request_context_getter_); 281 DCHECK(request_context_getter_);
281 indexed_db_context_->GetIDBFactory()->DeleteDatabase( 282 indexed_db_context_->GetIDBFactory()->DeleteDatabase(
282 name, request_context_getter_, callbacks, origin, indexed_db_path, 283 name, request_context_getter_, callbacks, origin, indexed_db_path,
283 force_close); 284 force_close);
284 } 285 }
285 286
286 } // namespace content 287 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698