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

Unified Diff: content/browser/indexed_db/indexed_db_callbacks.h

Issue 2370643004: Port messages sent by WebIDBFactoryImpl to Mojo. (Closed)
Patch Set: Allow cpp_only to be set by the invoker. Created 4 years, 3 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_callbacks.h
diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h
index edca21931df9b909d657b866b0e2e4c2ff7dcca2..97500e47fad7ea57212390ad1edb808e6c830e71 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_callbacks.h
@@ -17,6 +17,7 @@
#include "base/strings/string16.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.mojom.h"
#include "content/common/indexed_db/indexed_db_key.h"
#include "content/common/indexed_db/indexed_db_key_path.h"
#include "url/origin.h"
@@ -46,13 +47,11 @@ class CONTENT_EXPORT IndexedDBCallbacks
int32_t ipc_callbacks_id,
int32_t ipc_cursor_id);
- // IndexedDBDatabase responses
- IndexedDBCallbacks(IndexedDBDispatcherHost* dispatcher_host,
- int32_t ipc_thread_id,
- int32_t ipc_callbacks_id,
- int32_t ipc_database_callbacks_id,
- int64_t host_transaction_id,
- const url::Origin& origin);
+ // Mojo-based responses
+ IndexedDBCallbacks(
+ IndexedDBDispatcherHost* dispatcher_host,
+ const url::Origin& origin,
+ ::indexed_db::mojom::CallbacksAssociatedPtrInfo callbacks_info);
virtual void OnError(const IndexedDBDatabaseError& error);
@@ -109,6 +108,10 @@ class CONTENT_EXPORT IndexedDBCallbacks
void SetConnectionOpenStartTime(const base::TimeTicks& start_time);
+ void set_host_transaction_id(int64_t host_transaction_id) {
+ host_transaction_id_ = host_transaction_id;
+ }
+
protected:
virtual ~IndexedDBCallbacks();
@@ -118,6 +121,8 @@ class CONTENT_EXPORT IndexedDBCallbacks
friend class base::RefCounted<IndexedDBCallbacks>;
+ class IOThreadHelper;
+
// Originally from IndexedDBCallbacks:
scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
int32_t ipc_callbacks_id_;
@@ -130,7 +135,6 @@ class CONTENT_EXPORT IndexedDBCallbacks
int64_t host_transaction_id_;
url::Origin origin_;
int32_t ipc_database_id_;
- int32_t ipc_database_callbacks_id_;
// Used to assert that OnSuccess is only called if there was no data loss.
blink::WebIDBDataLoss data_loss_;
@@ -138,6 +142,9 @@ class CONTENT_EXPORT IndexedDBCallbacks
// The "blocked" event should be sent at most once per request.
bool sent_blocked_;
base::TimeTicks connection_open_start_time_;
+
+ IOThreadHelper* helper_;
+
DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
};

Powered by Google App Engine
This is Rietveld 408576698