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

Unified Diff: content/common/indexed_db/indexed_db_dispatcher.cc

Issue 10917099: Chromium side of "consolidate two-phase connection to avoid race conditions". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/common/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index 8981c2c9a45462ffd18b45f92715394062c1e047..30b6c41444f7b47dae0c6370e9437b17841d2c8a 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -202,10 +202,13 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen(
const string16& name,
int64 version,
WebIDBCallbacks* callbacks_ptr,
+ WebIDBDatabaseCallbacks* database_callbacks_ptr,
const string16& origin,
WebFrame* web_frame) {
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ scoped_ptr<WebIDBDatabaseCallbacks>
+ database_callbacks(database_callbacks_ptr);
if (!CurrentWorkerId() &&
!ChildThread::current()->IsWebFrameValid(web_frame))
@@ -214,6 +217,8 @@ void IndexedDBDispatcher::RequestIDBFactoryOpen(
IndexedDBHostMsg_FactoryOpen_Params params;
params.thread_id = CurrentWorkerId();
params.response_id = pending_callbacks_.Add(callbacks.release());
+ params.database_response_id = pending_database_callbacks_.Add(
+ database_callbacks.release());
params.origin = origin;
params.name = name;
params.version = version;
@@ -267,18 +272,6 @@ void IndexedDBDispatcher::RequestIDBDatabaseClose(int32 idb_database_id) {
pending_database_callbacks_.Remove(idb_database_id);
}
-void IndexedDBDispatcher::RequestIDBDatabaseOpen(
- WebIDBDatabaseCallbacks* callbacks_ptr,
- int32 idb_database_id) {
- ResetCursorPrefetchCaches();
- scoped_ptr<WebIDBDatabaseCallbacks> callbacks(callbacks_ptr);
-
- DCHECK(!pending_database_callbacks_.Lookup(idb_database_id));
- pending_database_callbacks_.AddWithID(callbacks.release(), idb_database_id);
- Send(new IndexedDBHostMsg_DatabaseOpen(idb_database_id, CurrentWorkerId(),
- idb_database_id));
-}
-
void IndexedDBDispatcher::RequestIDBDatabaseSetVersion(
const string16& version,
WebIDBCallbacks* callbacks_ptr,

Powered by Google App Engine
This is Rietveld 408576698