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

Unified Diff: content/browser/indexed_db/indexed_db_observer_changes.cc

Issue 2125213002: [IndexedDB] Propogating changes to observers : Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lifetime
Patch Set: IDBDatabase weakptr introduced on IDBObserver Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/indexed_db/indexed_db_observer_changes.cc
diff --git a/content/browser/indexed_db/indexed_db_observer_changes.cc b/content/browser/indexed_db/indexed_db_observer_changes.cc
new file mode 100644
index 0000000000000000000000000000000000000000..961e33e9f6c49d233701c2c918267544e848445f
--- /dev/null
+++ b/content/browser/indexed_db/indexed_db_observer_changes.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/indexed_db/indexed_db_observer_changes.h"
+
+#include "content/browser/indexed_db/indexed_db_observation.h"
+
+namespace content {
+
+IndexedDBObserverChanges::IndexedDBObserverChanges() {}
+
+IndexedDBObserverChanges::~IndexedDBObserverChanges() {}
+
+void IndexedDBObserverChanges::RecordObserverForLastObservation(
+ int32_t observer_id) {
+ observation_index_[observer_id].push_back(observations_.size() - 1);
+}
+
+void IndexedDBObserverChanges::AddObservation(
+ std::unique_ptr<IndexedDBObservation> observation) {
+ observations_.push_back(std::move(observation));
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698