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"), | |
18 scoped_ptr<LevelDBDatabase>(), | |
19 scoped_ptr<LevelDBComparator>()) {} | |
20 virtual std::vector<string16> GetDatabaseNames() OVERRIDE; | 17 virtual std::vector<string16> GetDatabaseNames() OVERRIDE; |
21 virtual bool GetIDBDatabaseMetaData(const string16& name, | 18 virtual bool GetIDBDatabaseMetaData(const string16& name, |
22 IndexedDBDatabaseMetadata*, | 19 IndexedDBDatabaseMetadata*, |
23 bool* found) OVERRIDE; | 20 bool* found) OVERRIDE; |
24 virtual bool CreateIDBDatabaseMetaData(const string16& name, | 21 virtual bool CreateIDBDatabaseMetaData(const string16& name, |
25 const string16& version, | 22 const string16& version, |
26 int64 int_version, | 23 int64 int_version, |
27 int64* row_id) OVERRIDE; | 24 int64* row_id) OVERRIDE; |
28 virtual bool UpdateIDBDatabaseIntVersion(Transaction*, | 25 virtual bool UpdateIDBDatabaseIntVersion(Transaction*, |
29 int64 row_id, | 26 int64 row_id, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 OVERRIDE; | 105 OVERRIDE; |
109 | 106 |
110 protected: | 107 protected: |
111 friend class base::RefCounted<IndexedDBFakeBackingStore>; | 108 friend class base::RefCounted<IndexedDBFakeBackingStore>; |
112 virtual ~IndexedDBFakeBackingStore(); | 109 virtual ~IndexedDBFakeBackingStore(); |
113 }; | 110 }; |
114 | 111 |
115 } // namespace content | 112 } // namespace content |
116 | 113 |
117 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ | 114 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FAKE_BACKING_STORE_H_ |
OLD | NEW |