| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const IndexedDBDatabase::Identifier& unique_identifier) override; | 48 const IndexedDBDatabase::Identifier& unique_identifier) override; |
| 49 std::unique_ptr<IndexedDBTransaction> CreateIndexedDBTransaction( | 49 std::unique_ptr<IndexedDBTransaction> CreateIndexedDBTransaction( |
| 50 int64_t id, | 50 int64_t id, |
| 51 IndexedDBConnection* connection, | 51 IndexedDBConnection* connection, |
| 52 const std::set<int64_t>& scope, | 52 const std::set<int64_t>& scope, |
| 53 blink::WebIDBTransactionMode mode, | 53 blink::WebIDBTransactionMode mode, |
| 54 IndexedDBBackingStore::Transaction* backing_store_transaction) override; | 54 IndexedDBBackingStore::Transaction* backing_store_transaction) override; |
| 55 scoped_refptr<LevelDBTransaction> CreateLevelDBTransaction( | 55 scoped_refptr<LevelDBTransaction> CreateLevelDBTransaction( |
| 56 LevelDBDatabase* db) override; | 56 LevelDBDatabase* db) override; |
| 57 std::unique_ptr<LevelDBIteratorImpl> CreateIteratorImpl( | 57 std::unique_ptr<LevelDBIteratorImpl> CreateIteratorImpl( |
| 58 std::unique_ptr<leveldb::Iterator> iterator) override; | 58 std::unique_ptr<leveldb::Iterator> iterator, |
| 59 LevelDBDatabase* db, |
| 60 const leveldb::Snapshot* snapshot) override; |
| 59 | 61 |
| 60 void FailOperation(FailClass failure_class, | 62 void FailOperation(FailClass failure_class, |
| 61 FailMethod failure_method, | 63 FailMethod failure_method, |
| 62 int fail_on_instance_num, | 64 int fail_on_instance_num, |
| 63 int fail_on_call_num); | 65 int fail_on_call_num); |
| 64 void Reset(); | 66 void Reset(); |
| 65 | 67 |
| 66 private: | 68 private: |
| 67 FailClass failure_class_; | 69 FailClass failure_class_; |
| 68 FailMethod failure_method_; | 70 FailMethod failure_method_; |
| 69 std::map<FailClass, int> instance_count_; | 71 std::map<FailClass, int> instance_count_; |
| 70 std::map<FailClass, int> fail_on_instance_num_; | 72 std::map<FailClass, int> fail_on_instance_num_; |
| 71 std::map<FailClass, int> fail_on_call_num_; | 73 std::map<FailClass, int> fail_on_call_num_; |
| 72 bool only_trace_calls_; | 74 bool only_trace_calls_; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 } // namespace content | 77 } // namespace content |
| 76 | 78 |
| 77 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_
H_ | 79 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_BROWSERTEST_INDEXED_DB_CLASS_FACTORY_
H_ |
| OLD | NEW |