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

Side by Side Diff: content/renderer/indexed_db_dispatcher.cc

Issue 7550055: Remove idb transaction callbacks onTimeout stuff that was removed from the spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove message definition Created 9 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/indexed_db_dispatcher.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/indexed_db_dispatcher.h" 5 #include "content/renderer/indexed_db_dispatcher.h"
6 6
7 #include "content/common/indexed_db_messages.h" 7 #include "content/common/indexed_db_messages.h"
8 #include "content/renderer/render_thread.h" 8 #include "content/renderer/render_thread.h"
9 #include "content/renderer/render_view.h" 9 #include "content/renderer/render_view.h"
10 #include "content/renderer/renderer_webidbcursor_impl.h" 10 #include "content/renderer/renderer_webidbcursor_impl.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIndexedDBKey, 48 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIndexedDBKey,
49 OnSuccessIndexedDBKey) 49 OnSuccessIndexedDBKey)
50 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIDBTransaction, 50 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIDBTransaction,
51 OnSuccessIDBTransaction) 51 OnSuccessIDBTransaction)
52 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValue, 52 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValue,
53 OnSuccessSerializedScriptValue) 53 OnSuccessSerializedScriptValue)
54 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError) 54 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError)
55 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksBlocked, OnBlocked) 55 IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksBlocked, OnBlocked)
56 IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksAbort, OnAbort) 56 IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksAbort, OnAbort)
57 IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksComplete, OnComplete) 57 IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksComplete, OnComplete)
58 IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksTimeout, OnTimeout)
59 IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksVersionChange, 58 IPC_MESSAGE_HANDLER(IndexedDBMsg_DatabaseCallbacksVersionChange,
60 OnVersionChange) 59 OnVersionChange)
61 IPC_MESSAGE_UNHANDLED(handled = false) 60 IPC_MESSAGE_UNHANDLED(handled = false)
62 IPC_END_MESSAGE_MAP() 61 IPC_END_MESSAGE_MAP()
63 return handled; 62 return handled;
64 } 63 }
65 64
66 void IndexedDBDispatcher::RequestIDBCursorUpdate( 65 void IndexedDBDispatcher::RequestIDBCursorUpdate(
67 const SerializedScriptValue& value, 66 const SerializedScriptValue& value,
68 WebIDBCallbacks* callbacks_ptr, 67 WebIDBCallbacks* callbacks_ptr,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 pending_transaction_callbacks_.Remove(transaction_id); 429 pending_transaction_callbacks_.Remove(transaction_id);
431 } 430 }
432 431
433 void IndexedDBDispatcher::OnComplete(int32 transaction_id) { 432 void IndexedDBDispatcher::OnComplete(int32 transaction_id) {
434 WebIDBTransactionCallbacks* callbacks = 433 WebIDBTransactionCallbacks* callbacks =
435 pending_transaction_callbacks_.Lookup(transaction_id); 434 pending_transaction_callbacks_.Lookup(transaction_id);
436 callbacks->onComplete(); 435 callbacks->onComplete();
437 pending_transaction_callbacks_.Remove(transaction_id); 436 pending_transaction_callbacks_.Remove(transaction_id);
438 } 437 }
439 438
440 void IndexedDBDispatcher::OnTimeout(int32 transaction_id) {
441 WebIDBTransactionCallbacks* callbacks =
442 pending_transaction_callbacks_.Lookup(transaction_id);
443 callbacks->onTimeout();
444 pending_transaction_callbacks_.Remove(transaction_id);
445 }
446
447 void IndexedDBDispatcher::OnVersionChange(int32 database_id, 439 void IndexedDBDispatcher::OnVersionChange(int32 database_id,
448 const string16& newVersion) { 440 const string16& newVersion) {
449 WebIDBDatabaseCallbacks* callbacks = 441 WebIDBDatabaseCallbacks* callbacks =
450 pending_database_callbacks_.Lookup(database_id); 442 pending_database_callbacks_.Lookup(database_id);
451 // callbacks would be NULL if a versionchange event is received after close 443 // callbacks would be NULL if a versionchange event is received after close
452 // has been called. 444 // has been called.
453 if (callbacks) 445 if (callbacks)
454 callbacks->onVersionChange(newVersion); 446 callbacks->onVersionChange(newVersion);
455 } 447 }
OLDNEW
« no previous file with comments | « content/renderer/indexed_db_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698