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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 m_callbacks->onAbort(transactionId, 63 m_callbacks->onAbort(transactionId,
64 DOMException::create(error.code(), error.message())); 64 DOMException::create(error.code(), error.message()));
65 } 65 }
66 } 66 }
67 67
68 void WebIDBDatabaseCallbacksImpl::onComplete(long long transactionId) { 68 void WebIDBDatabaseCallbacksImpl::onComplete(long long transactionId) {
69 if (m_callbacks) 69 if (m_callbacks)
70 m_callbacks->onComplete(transactionId); 70 m_callbacks->onComplete(transactionId);
71 } 71 }
72 72
73 void WebIDBDatabaseCallbacksImpl::onChanges(
74 const std::unordered_map<int32_t, std::vector<int32_t>>&
75 observation_index_map,
76 const WebVector<WebIDBObservation>& observations) {
77 if (m_callbacks)
78 m_callbacks->onChanges(observation_index_map, observations);
79 }
80
73 void WebIDBDatabaseCallbacksImpl::detach() { 81 void WebIDBDatabaseCallbacksImpl::detach() {
74 m_callbacks.clear(); 82 m_callbacks.clear();
75 } 83 }
76 84
77 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698