Index: content/browser/indexed_db/indexed_db_dispatcher_host.cc |
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc |
index aac0dd9381135acfa6393bc6c5ccbd0fa173b308..90db0d670205af90ec6851dd84ac6a0f45c898ee 100644 |
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc |
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc |
@@ -23,10 +23,12 @@ |
#include "content/browser/indexed_db/indexed_db_cursor.h" |
#include "content/browser/indexed_db/indexed_db_database_callbacks.h" |
#include "content/browser/indexed_db/indexed_db_metadata.h" |
+#include "content/browser/indexed_db/indexed_db_observer_changes.h" |
#include "content/browser/indexed_db/indexed_db_pending_connection.h" |
#include "content/browser/indexed_db/indexed_db_value.h" |
#include "content/browser/renderer_host/render_message_filter.h" |
#include "content/common/indexed_db/indexed_db_messages.h" |
+#include "content/common/indexed_db/indexed_db_observation.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/user_metrics.h" |
#include "content/public/common/content_switches.h" |
@@ -317,6 +319,26 @@ IndexedDBCursor* IndexedDBDispatcherHost::GetCursorFromId( |
return metadata; |
} |
+::IndexedDBObserverChanges IndexedDBDispatcherHost::ConvertObserverChanges( |
+ content::IndexedDBObserverChanges* changes) { |
+ ::IndexedDBObserverChanges idb_changes; |
+ // TODO(palakj): Move the map instead of copying? |
+ idb_changes.observation_index = changes->observation_index; |
+ for (auto& iter : changes->observations) { |
+ ::IndexedDBObservation idb_observation = ConvertObservation(iter.release()); |
+ } |
+ return idb_changes; |
+} |
+ |
+::IndexedDBObservation IndexedDBDispatcherHost::ConvertObservation( |
+ content::IndexedDBObservation* observation) { |
+ // TODO(palakj): Modify function for different observation constructors. |
+ ::IndexedDBObservation idb_observation; |
+ idb_observation.type = observation->type(); |
+ idb_observation.key_range = observation->key_range(); |
+ return idb_observation; |
+} |
+ |
void IndexedDBDispatcherHost::OnIDBFactoryGetDatabaseNames( |
const IndexedDBHostMsg_FactoryGetDatabaseNames_Params& params) { |
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); |