OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/indexed_db/indexed_db_open_request_observer_impl.h" |
| 6 |
| 7 #include <utility> |
| 8 |
| 9 #include "content/browser/indexed_db/indexed_db_connection.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 IndexedDBOpenRequestObserverImpl::IndexedDBOpenRequestObserverImpl( |
| 14 ::indexed_db::mojom::OpenRequestObserverPtr observer) |
| 15 : observer_(std::move(observer)) {} |
| 16 |
| 17 IndexedDBOpenRequestObserverImpl::~IndexedDBOpenRequestObserverImpl() = default; |
| 18 |
| 19 void IndexedDBOpenRequestObserverImpl::OnBlocked(int64_t old_version) { |
| 20 observer_->OnBlocked(old_version); |
| 21 } |
| 22 |
| 23 void IndexedDBOpenRequestObserverImpl::OnUpgradeNeeded( |
| 24 int64_t old_version, |
| 25 IndexedDBConnection* connection, |
| 26 const content::IndexedDBDataLossInfo& data_loss_info, |
| 27 const IndexedDBDatabaseMetadata& index_metadata) { |
| 28 ::indexed_db::mojom::DatabasePtr interface; |
| 29 connection->Bind(GetProxy(&interface)); |
| 30 observer_->OnUpgradeNeeded(old_version, std::move(interface), index_metadata, |
| 31 data_loss_info); |
| 32 } |
| 33 |
| 34 } // namespace content |
OLD | NEW |