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

Side by Side Diff: content/common/indexed_db/proxy_webidbtransaction_impl.cc

Issue 10831138: Remove a ton of IPC from landing putWithIndexKeys (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Additional stuff found with lint Created 8 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 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/common/indexed_db/proxy_webidbtransaction_impl.h" 5 #include "content/common/indexed_db/proxy_webidbtransaction_impl.h"
6 6
7 #include "content/common/indexed_db/indexed_db_messages.h" 7 #include "content/common/indexed_db/indexed_db_messages.h"
8 #include "content/common/indexed_db/indexed_db_dispatcher.h" 8 #include "content/common/indexed_db/indexed_db_dispatcher.h"
9 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h" 9 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h"
10 #include "content/common/child_thread.h" 10 #include "content/common/child_thread.h"
(...skipping 12 matching lines...) Expand all
23 23
24 RendererWebIDBTransactionImpl::~RendererWebIDBTransactionImpl() { 24 RendererWebIDBTransactionImpl::~RendererWebIDBTransactionImpl() {
25 // It's not possible for there to be pending callbacks that address this 25 // It's not possible for there to be pending callbacks that address this
26 // object since inside WebKit, they hold a reference to the object wich owns 26 // object since inside WebKit, they hold a reference to the object wich owns
27 // this object. But, if that ever changed, then we'd need to invalidate 27 // this object. But, if that ever changed, then we'd need to invalidate
28 // any such pointers. 28 // any such pointers.
29 IndexedDBDispatcher::Send(new IndexedDBHostMsg_TransactionDestroyed( 29 IndexedDBDispatcher::Send(new IndexedDBHostMsg_TransactionDestroyed(
30 idb_transaction_id_)); 30 idb_transaction_id_));
31 } 31 }
32 32
33 int RendererWebIDBTransactionImpl::mode() const {
34 int mode;
35 IndexedDBDispatcher::Send(new IndexedDBHostMsg_TransactionMode(
36 idb_transaction_id_, &mode));
37 return mode;
38 }
39
40 WebIDBObjectStore* RendererWebIDBTransactionImpl::objectStore( 33 WebIDBObjectStore* RendererWebIDBTransactionImpl::objectStore(
41 const WebString& name, 34 const WebString& name,
42 WebKit::WebExceptionCode& ec) { 35 WebKit::WebExceptionCode& ec) {
43 int object_store_id; 36 int object_store_id;
44 IndexedDBDispatcher::Send( 37 IndexedDBDispatcher::Send(
45 new IndexedDBHostMsg_TransactionObjectStore( 38 new IndexedDBHostMsg_TransactionObjectStore(
46 idb_transaction_id_, name, &object_store_id, &ec)); 39 idb_transaction_id_, name, &object_store_id, &ec));
47 if (!object_store_id) 40 if (!object_store_id)
48 return NULL; 41 return NULL;
49 return new RendererWebIDBObjectStoreImpl(object_store_id); 42 return new RendererWebIDBObjectStoreImpl(object_store_id);
(...skipping 15 matching lines...) Expand all
65 idb_transaction_id_)); 58 idb_transaction_id_));
66 } 59 }
67 60
68 void RendererWebIDBTransactionImpl::setCallbacks( 61 void RendererWebIDBTransactionImpl::setCallbacks(
69 WebIDBTransactionCallbacks* callbacks) { 62 WebIDBTransactionCallbacks* callbacks) {
70 IndexedDBDispatcher* dispatcher = 63 IndexedDBDispatcher* dispatcher =
71 IndexedDBDispatcher::ThreadSpecificInstance(); 64 IndexedDBDispatcher::ThreadSpecificInstance();
72 dispatcher->RegisterWebIDBTransactionCallbacks(callbacks, 65 dispatcher->RegisterWebIDBTransactionCallbacks(callbacks,
73 idb_transaction_id_); 66 idb_transaction_id_);
74 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698