| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BACKING_STORE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class LevelDBComparator; | 26 class LevelDBComparator; |
| 27 class LevelDBDatabase; | 27 class LevelDBDatabase; |
| 28 | 28 |
| 29 class LevelDBFactory { | 29 class LevelDBFactory { |
| 30 public: | 30 public: |
| 31 virtual ~LevelDBFactory() {} | 31 virtual ~LevelDBFactory() {} |
| 32 virtual scoped_ptr<LevelDBDatabase> OpenLevelDB( | 32 virtual scoped_ptr<LevelDBDatabase> OpenLevelDB( |
| 33 const base::FilePath& file_name, | 33 const base::FilePath& file_name, |
| 34 const LevelDBComparator* comparator) = 0; | 34 const LevelDBComparator* comparator, |
| 35 bool* is_disk_full = NULL) = 0; |
| 35 virtual bool DestroyLevelDB(const base::FilePath& file_name) = 0; | 36 virtual bool DestroyLevelDB(const base::FilePath& file_name) = 0; |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 class CONTENT_EXPORT IndexedDBBackingStore | 39 class CONTENT_EXPORT IndexedDBBackingStore |
| 39 : public base::RefCounted<IndexedDBBackingStore> { | 40 : public base::RefCounted<IndexedDBBackingStore> { |
| 40 public: | 41 public: |
| 41 class CONTENT_EXPORT Transaction; | 42 class CONTENT_EXPORT Transaction; |
| 42 | 43 |
| 43 static scoped_refptr<IndexedDBBackingStore> Open( | 44 static scoped_refptr<IndexedDBBackingStore> Open( |
| 44 const string16& database_identifier, | 45 const string16& database_identifier, |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 string16 identifier_; | 312 string16 identifier_; |
| 312 | 313 |
| 313 scoped_ptr<LevelDBDatabase> db_; | 314 scoped_ptr<LevelDBDatabase> db_; |
| 314 scoped_ptr<LevelDBComparator> comparator_; | 315 scoped_ptr<LevelDBComparator> comparator_; |
| 315 base::WeakPtrFactory<IndexedDBBackingStore> weak_factory_; | 316 base::WeakPtrFactory<IndexedDBBackingStore> weak_factory_; |
| 316 }; | 317 }; |
| 317 | 318 |
| 318 } // namespace content | 319 } // namespace content |
| 319 | 320 |
| 320 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 321 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| OLD | NEW |