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

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

Issue 2438233004: Make IndexedDBConnection IDs independent from the IPC database ID. (Closed)
Patch Set: Created 4 years, 2 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_database_callbacks.h" 5 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
6 6
7 #include "content/browser/indexed_db/indexed_db_context_impl.h" 7 #include "content/browser/indexed_db/indexed_db_context_impl.h"
8 #include "content/browser/indexed_db/indexed_db_database_error.h" 8 #include "content/browser/indexed_db/indexed_db_database_error.h"
9 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 9 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
10 #include "content/browser/indexed_db/indexed_db_observer_changes.h" 10 #include "content/browser/indexed_db/indexed_db_observer_changes.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 dispatcher_host_->FinishTransaction(host_transaction_id, true); 93 dispatcher_host_->FinishTransaction(host_transaction_id, true);
94 DCHECK(io_helper_); 94 DCHECK(io_helper_);
95 BrowserThread::PostTask( 95 BrowserThread::PostTask(
96 BrowserThread::IO, FROM_HERE, 96 BrowserThread::IO, FROM_HERE,
97 base::Bind(&IOThreadHelper::SendComplete, 97 base::Bind(&IOThreadHelper::SendComplete,
98 base::Unretained(io_helper_.get()), 98 base::Unretained(io_helper_.get()),
99 dispatcher_host_->RendererTransactionId(host_transaction_id))); 99 dispatcher_host_->RendererTransactionId(host_transaction_id)));
100 } 100 }
101 101
102 void IndexedDBDatabaseCallbacks::OnDatabaseChange( 102 void IndexedDBDatabaseCallbacks::OnDatabaseChange(
103 int32_t ipc_database_id,
104 std::unique_ptr<IndexedDBObserverChanges> changes) { 103 std::unique_ptr<IndexedDBObserverChanges> changes) {
105 DCHECK(thread_checker_.CalledOnValidThread()); 104 DCHECK(thread_checker_.CalledOnValidThread());
106 DCHECK(io_helper_); 105 DCHECK(io_helper_);
107 dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksChanges( 106 dispatcher_host_->Send(new IndexedDBMsg_DatabaseCallbacksChanges(
108 ipc_thread_id_, ipc_database_id, 107 ipc_thread_id_,
109 IndexedDBDispatcherHost::ConvertObserverChanges(std::move(changes)))); 108 IndexedDBDispatcherHost::ConvertObserverChanges(std::move(changes))));
110 } 109 }
111 110
112 IndexedDBDatabaseCallbacks::IOThreadHelper::IOThreadHelper( 111 IndexedDBDatabaseCallbacks::IOThreadHelper::IOThreadHelper(
113 DatabaseCallbacksAssociatedPtrInfo callbacks_info) { 112 DatabaseCallbacksAssociatedPtrInfo callbacks_info) {
114 callbacks_.Bind(std::move(callbacks_info)); 113 callbacks_.Bind(std::move(callbacks_info));
115 } 114 }
116 115
117 IndexedDBDatabaseCallbacks::IOThreadHelper::~IOThreadHelper() {} 116 IndexedDBDatabaseCallbacks::IOThreadHelper::~IOThreadHelper() {}
118 117
(...skipping 12 matching lines...) Expand all
131 const IndexedDBDatabaseError& error) { 130 const IndexedDBDatabaseError& error) {
132 callbacks_->Abort(transaction_id, error.code(), error.message()); 131 callbacks_->Abort(transaction_id, error.code(), error.message());
133 } 132 }
134 133
135 void IndexedDBDatabaseCallbacks::IOThreadHelper::SendComplete( 134 void IndexedDBDatabaseCallbacks::IOThreadHelper::SendComplete(
136 int64_t transaction_id) { 135 int64_t transaction_id) {
137 callbacks_->Complete(transaction_id); 136 callbacks_->Complete(transaction_id);
138 } 137 }
139 138
140 } // namespace content 139 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database_callbacks.h ('k') | content/browser/indexed_db/indexed_db_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698