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

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

Issue 18224002: IndexedDB: Eliminate IndexedDBDatabaseCallbacksWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fix for win Created 7 years, 6 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_database_callbacks.cc
diff --git a/content/browser/indexed_db/indexed_db_database_callbacks.cc b/content/browser/indexed_db/indexed_db_database_callbacks.cc
index fb74eed493eebac1d608b9d1c0858ed8ec7a81e9..e2c7da6cb4069e8f77706f39aff5d648f7895a9f 100644
--- a/content/browser/indexed_db/indexed_db_database_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_database_callbacks.cc
@@ -4,7 +4,6 @@
#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
-#include "base/memory/scoped_vector.h"
#include "content/browser/indexed_db/indexed_db_database_error.h"
#include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
#include "content/common/indexed_db/indexed_db_messages.h"
@@ -21,20 +20,31 @@ IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks(
IndexedDBDatabaseCallbacks::~IndexedDBDatabaseCallbacks() {}
-void IndexedDBDatabaseCallbacks::onForcedClose() {
+void IndexedDBDatabaseCallbacks::OnForcedClose() {
+ if (!dispatcher_host_)
+ return;
+
dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksForcedClose(
ipc_thread_id_, ipc_database_callbacks_id_));
+
+ dispatcher_host_ = NULL;
}
-void IndexedDBDatabaseCallbacks::onVersionChange(long long old_version,
- long long new_version) {
+void IndexedDBDatabaseCallbacks::OnVersionChange(int64 old_version,
+ int64 new_version) {
+ if (!dispatcher_host_)
+ return;
+
dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksIntVersionChange(
ipc_thread_id_, ipc_database_callbacks_id_, old_version, new_version));
}
-void IndexedDBDatabaseCallbacks::onAbort(
- long long host_transaction_id,
+void IndexedDBDatabaseCallbacks::OnAbort(
+ int64 host_transaction_id,
const IndexedDBDatabaseError& error) {
+ if (!dispatcher_host_)
+ return;
+
dispatcher_host_->FinishTransaction(host_transaction_id, false);
dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksAbort(
ipc_thread_id_,
@@ -44,7 +54,10 @@ void IndexedDBDatabaseCallbacks::onAbort(
error.message()));
}
-void IndexedDBDatabaseCallbacks::onComplete(long long host_transaction_id) {
+void IndexedDBDatabaseCallbacks::OnComplete(int64 host_transaction_id) {
+ if (!dispatcher_host_)
+ return;
+
dispatcher_host_->FinishTransaction(host_transaction_id, true);
dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksComplete(
ipc_thread_id_,

Powered by Google App Engine
This is Rietveld 408576698