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 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_ |
| 7 |
| 8 #include "content/browser/indexed_db/indexed_db_open_request_observer.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 // TODO(cmumford): Should be able to use googlemock. |
| 13 |
| 14 class MockIndexedDBOpenRequestObserver : public IndexedDBOpenRequestObserver { |
| 15 public: |
| 16 MockIndexedDBOpenRequestObserver(); |
| 17 |
| 18 // content::IndexedDBOpenRequestObserver |
| 19 void OnBlocked(int64_t old_version) override; |
| 20 void OnUpgradeNeeded( |
| 21 int64_t old_version, |
| 22 IndexedDBConnection* connection, |
| 23 const content::IndexedDBDataLossInfo& data_loss_info, |
| 24 const IndexedDBDatabaseMetadata& index_metadata) override; |
| 25 |
| 26 bool blocked_called() const { return blocked_called_; } |
| 27 |
| 28 protected: |
| 29 ~MockIndexedDBOpenRequestObserver() override; |
| 30 |
| 31 private: |
| 32 friend class base::RefCounted<MockIndexedDBOpenRequestObserver>; |
| 33 |
| 34 bool blocked_called_ = false; |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_OPEN_REQUEST_OBSERVER_H_ |
OLD | NEW |