| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_INDEXED_DB_FAKE_BACKING_STORE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 10 #include "content/browser/indexed_db/indexed_db_backing_store.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 class IndexedDBFakeBackingStore : public IndexedDBBackingStore { | 14 class IndexedDBFakeBackingStore : public IndexedDBBackingStore { |
| 15 public: | 15 public: |
| 16 IndexedDBFakeBackingStore() | 16 IndexedDBFakeBackingStore() |
| 17 : IndexedDBBackingStore(GURL("http://localhost:81"), | 17 : IndexedDBBackingStore(GURL("http://localhost:81"), |
| 18 scoped_ptr<LevelDBDatabase>(), | 18 scoped_ptr<LevelDBDatabase>(), |
| 19 scoped_ptr<LevelDBComparator>()) {} | 19 scoped_ptr<LevelDBComparator>()) {} |
| 20 virtual std::vector<string16> GetDatabaseNames() OVERRIDE; | 20 virtual std::vector<base::string16> GetDatabaseNames() OVERRIDE; |
| 21 virtual bool GetIDBDatabaseMetaData(const string16& name, | 21 virtual bool GetIDBDatabaseMetaData(const base::string16& name, |
| 22 IndexedDBDatabaseMetadata*, | 22 IndexedDBDatabaseMetadata*, |
| 23 bool* found) OVERRIDE; | 23 bool* found) OVERRIDE; |
| 24 virtual bool CreateIDBDatabaseMetaData(const string16& name, | 24 virtual bool CreateIDBDatabaseMetaData(const base::string16& name, |
| 25 const string16& version, | 25 const base::string16& version, |
| 26 int64 int_version, | 26 int64 int_version, |
| 27 int64* row_id) OVERRIDE; | 27 int64* row_id) OVERRIDE; |
| 28 virtual bool UpdateIDBDatabaseIntVersion(Transaction*, | 28 virtual bool UpdateIDBDatabaseIntVersion(Transaction*, |
| 29 int64 row_id, | 29 int64 row_id, |
| 30 int64 version) OVERRIDE; | 30 int64 version) OVERRIDE; |
| 31 virtual bool DeleteDatabase(const string16& name) OVERRIDE; | 31 virtual bool DeleteDatabase(const base::string16& name) OVERRIDE; |
| 32 | 32 |
| 33 virtual bool CreateObjectStore(Transaction*, | 33 virtual bool CreateObjectStore(Transaction*, |
| 34 int64 database_id, | 34 int64 database_id, |
| 35 int64 object_store_id, | 35 int64 object_store_id, |
| 36 const string16& name, | 36 const base::string16& name, |
| 37 const IndexedDBKeyPath&, | 37 const IndexedDBKeyPath&, |
| 38 bool auto_increment) OVERRIDE; | 38 bool auto_increment) OVERRIDE; |
| 39 | 39 |
| 40 virtual bool ClearObjectStore(Transaction*, | 40 virtual bool ClearObjectStore(Transaction*, |
| 41 int64 database_id, | 41 int64 database_id, |
| 42 int64 object_store_id) OVERRIDE; | 42 int64 object_store_id) OVERRIDE; |
| 43 virtual bool DeleteRecord(Transaction*, | 43 virtual bool DeleteRecord(Transaction*, |
| 44 int64 database_id, | 44 int64 database_id, |
| 45 int64 object_store_id, | 45 int64 object_store_id, |
| 46 const RecordIdentifier&) OVERRIDE; | 46 const RecordIdentifier&) OVERRIDE; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 58 int64 database_id, | 58 int64 database_id, |
| 59 int64 object_store_id, | 59 int64 object_store_id, |
| 60 const IndexedDBKey&, | 60 const IndexedDBKey&, |
| 61 RecordIdentifier* found_record_identifier, | 61 RecordIdentifier* found_record_identifier, |
| 62 bool* found) OVERRIDE; | 62 bool* found) OVERRIDE; |
| 63 | 63 |
| 64 virtual bool CreateIndex(Transaction*, | 64 virtual bool CreateIndex(Transaction*, |
| 65 int64 database_id, | 65 int64 database_id, |
| 66 int64 object_store_id, | 66 int64 object_store_id, |
| 67 int64 index_id, | 67 int64 index_id, |
| 68 const string16& name, | 68 const base::string16& name, |
| 69 const IndexedDBKeyPath&, | 69 const IndexedDBKeyPath&, |
| 70 bool is_unique, | 70 bool is_unique, |
| 71 bool is_multi_entry) OVERRIDE; | 71 bool is_multi_entry) OVERRIDE; |
| 72 virtual bool DeleteIndex(Transaction*, | 72 virtual bool DeleteIndex(Transaction*, |
| 73 int64 database_id, | 73 int64 database_id, |
| 74 int64 object_store_id, | 74 int64 object_store_id, |
| 75 int64 index_id) OVERRIDE; | 75 int64 index_id) OVERRIDE; |
| 76 virtual bool PutIndexDataForRecord(Transaction*, | 76 virtual bool PutIndexDataForRecord(Transaction*, |
| 77 int64 database_id, | 77 int64 database_id, |
| 78 int64 object_store_id, | 78 int64 object_store_id, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 108 OVERRIDE; | 108 OVERRIDE; |
| 109 | 109 |
| 110 protected: | 110 protected: |
| 111 friend class base::RefCounted<IndexedDBFakeBackingStore>; | 111 friend class base::RefCounted<IndexedDBFakeBackingStore>; |
| 112 virtual ~IndexedDBFakeBackingStore(); | 112 virtual ~IndexedDBFakeBackingStore(); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace content | 115 } // namespace content |
| 116 | 116 |
| 117 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 117 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
| OLD | NEW |