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

Unified Diff: content/browser/indexed_db/indexed_db_transaction.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_transaction.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
index 5040dddf49fdcabdb0bc06ff18177f95b312c7a2..9a8327063c1ed7eb1c14094431d58d30670d8a67 100644
--- a/content/browser/indexed_db/indexed_db_transaction.cc
+++ b/content/browser/indexed_db/indexed_db_transaction.cc
@@ -4,6 +4,8 @@
#include "content/browser/indexed_db/indexed_db_transaction.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
@@ -13,9 +15,9 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
+#include "content/browser/indexed_db/indexed_db_change_handler.h"
#include "content/browser/indexed_db/indexed_db_cursor.h"
#include "content/browser/indexed_db/indexed_db_database.h"
-#include "content/browser/indexed_db/indexed_db_database_callbacks.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_tracing.h"
@@ -85,7 +87,7 @@ IndexedDBTransaction::IndexedDBTransaction(
backing_store_transaction_begun_(false),
should_process_queue_(false),
pending_preemptive_events_(0) {
- callbacks_ = connection_->callbacks();
+ change_handler_ = connection_->change_handler();
database_ = connection_->database();
database_->transaction_coordinator().DidCreateTransaction(this);
@@ -191,8 +193,8 @@ void IndexedDBTransaction::Abort(const IndexedDBDatabaseError& error) {
DCHECK(!database_->transaction_coordinator().IsActive(this));
#endif
- if (callbacks_.get())
- callbacks_->OnAbort(id_, error);
+ if (change_handler_.get())
+ change_handler_->OnAbort(id_, error);
database_->TransactionFinished(this, false);
@@ -359,7 +361,7 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
IDB_TRACE1(
"IndexedDBTransaction::CommitPhaseTwo.TransactionCompleteCallbacks",
"txn.id", id());
- callbacks_->OnComplete(id_);
+ change_handler_->OnComplete(id_);
}
if (!pending_observers_.empty() && connection_) {
connection_->ActivatePendingObservers(std::move(pending_observers_));
@@ -380,7 +382,7 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
error = IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError,
"Internal error committing transaction.");
}
- callbacks_->OnAbort(id_, error);
+ change_handler_->OnAbort(id_, error);
database_->TransactionFinished(this, false);
database_->TransactionCommitFailed(s);
« no previous file with comments | « content/browser/indexed_db/indexed_db_transaction.h ('k') | content/browser/indexed_db/indexed_db_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698