| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 namespace net { | 44 namespace net { |
| 45 class URLRequestContext; | 45 class URLRequestContext; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace content { | 48 namespace content { |
| 49 | 49 |
| 50 class IndexedDBFactory; | 50 class IndexedDBFactory; |
| 51 class LevelDBComparator; | 51 class LevelDBComparator; |
| 52 class LevelDBDatabase; | 52 class LevelDBDatabase; |
| 53 class LevelDBFactory; |
| 53 struct IndexedDBValue; | 54 struct IndexedDBValue; |
| 54 | 55 |
| 55 class LevelDBFactory { | |
| 56 public: | |
| 57 virtual ~LevelDBFactory() {} | |
| 58 virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name, | |
| 59 const LevelDBComparator* comparator, | |
| 60 scoped_ptr<LevelDBDatabase>* db, | |
| 61 bool* is_disk_full) = 0; | |
| 62 virtual leveldb::Status DestroyLevelDB(const base::FilePath& file_name) = 0; | |
| 63 }; | |
| 64 | |
| 65 class CONTENT_EXPORT IndexedDBBackingStore | 56 class CONTENT_EXPORT IndexedDBBackingStore |
| 66 : public base::RefCounted<IndexedDBBackingStore> { | 57 : public base::RefCounted<IndexedDBBackingStore> { |
| 67 public: | 58 public: |
| 68 class CONTENT_EXPORT Transaction; | 59 class CONTENT_EXPORT Transaction; |
| 69 | 60 |
| 70 class CONTENT_EXPORT Comparator : public LevelDBComparator { | 61 class CONTENT_EXPORT Comparator : public LevelDBComparator { |
| 71 public: | 62 public: |
| 72 virtual int Compare(const base::StringPiece& a, | 63 virtual int Compare(const base::StringPiece& a, |
| 73 const base::StringPiece& b) const OVERRIDE; | 64 const base::StringPiece& b) const OVERRIDE; |
| 74 virtual const char* Name() const OVERRIDE; | 65 virtual const char* Name() const OVERRIDE; |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 // will hold a reference to this backing store. | 579 // will hold a reference to this backing store. |
| 589 IndexedDBActiveBlobRegistry active_blob_registry_; | 580 IndexedDBActiveBlobRegistry active_blob_registry_; |
| 590 base::OneShotTimer<IndexedDBBackingStore> close_timer_; | 581 base::OneShotTimer<IndexedDBBackingStore> close_timer_; |
| 591 | 582 |
| 592 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); | 583 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); |
| 593 }; | 584 }; |
| 594 | 585 |
| 595 } // namespace content | 586 } // namespace content |
| 596 | 587 |
| 597 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 588 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
| OLD | NEW |