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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.cpp

Issue 2511403003: Send IndexedDB observations through IDBDatabaseCallbacks. (Closed)
Patch Set: Remove unnecessary forward declaration. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.cpp b/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.cpp
deleted file mode 100644
index 8b53b5c4102342f7e71bd5739b41d4f01ea08e56..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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 "modules/indexeddb/WebIDBObserverImpl.h"
-
-#include "wtf/PtrUtil.h"
-
-namespace blink {
-
-// static
-std::unique_ptr<WebIDBObserverImpl> WebIDBObserverImpl::create(
- IDBObserver* observer,
- bool transaction,
- bool values,
- bool noRecords,
- std::bitset<WebIDBOperationTypeCount> operationTypes) {
- return wrapUnique(new WebIDBObserverImpl(observer, transaction, values,
- noRecords, operationTypes));
-}
-
-WebIDBObserverImpl::WebIDBObserverImpl(
- IDBObserver* observer,
- bool transaction,
- bool values,
- bool noRecords,
- std::bitset<WebIDBOperationTypeCount> operationTypes)
- : m_id(kInvalidObserverId),
- m_transaction(transaction),
- m_values(values),
- m_noRecords(noRecords),
- m_operationTypes(operationTypes),
- m_observer(observer) {}
-
-// Remove observe call id from IDBObserver.
-WebIDBObserverImpl::~WebIDBObserverImpl() {
- if (m_id != kInvalidObserverId)
- m_observer->removeObserver(m_id);
-}
-
-void WebIDBObserverImpl::setId(int32_t id) {
- DCHECK_EQ(kInvalidObserverId, m_id);
- m_id = id;
-}
-
-void WebIDBObserverImpl::onChange(
- const WebVector<WebIDBObservation>& observations,
- const WebVector<int32_t>& observationIndex) {
- m_observer->onChange(m_id, observations, std::move(observationIndex));
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/WebIDBObserverImpl.h ('k') | third_party/WebKit/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698