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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 namespace net { | 49 namespace net { |
50 class URLRequestContext; | 50 class URLRequestContext; |
51 } | 51 } |
52 | 52 |
53 namespace content { | 53 namespace content { |
54 | 54 |
55 class IndexedDBFactory; | 55 class IndexedDBFactory; |
56 class LevelDBComparator; | 56 class LevelDBComparator; |
57 class LevelDBDatabase; | 57 class LevelDBDatabase; |
58 class LevelDBFactory; | 58 class LevelDBFactory; |
| 59 struct IndexedDBDataLossInfo; |
59 struct IndexedDBValue; | 60 struct IndexedDBValue; |
60 | 61 |
61 class CONTENT_EXPORT IndexedDBBackingStore | 62 class CONTENT_EXPORT IndexedDBBackingStore |
62 : public base::RefCounted<IndexedDBBackingStore> { | 63 : public base::RefCounted<IndexedDBBackingStore> { |
63 public: | 64 public: |
64 class CONTENT_EXPORT Comparator : public LevelDBComparator { | 65 class CONTENT_EXPORT Comparator : public LevelDBComparator { |
65 public: | 66 public: |
66 int Compare(const base::StringPiece& a, | 67 int Compare(const base::StringPiece& a, |
67 const base::StringPiece& b) const override; | 68 const base::StringPiece& b) const override; |
68 const char* Name() const override; | 69 const char* Name() const override; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 base::OneShotTimer* close_timer() { return &close_timer_; } | 366 base::OneShotTimer* close_timer() { return &close_timer_; } |
366 IndexedDBActiveBlobRegistry* active_blob_registry() { | 367 IndexedDBActiveBlobRegistry* active_blob_registry() { |
367 return &active_blob_registry_; | 368 return &active_blob_registry_; |
368 } | 369 } |
369 | 370 |
370 static scoped_refptr<IndexedDBBackingStore> Open( | 371 static scoped_refptr<IndexedDBBackingStore> Open( |
371 IndexedDBFactory* indexed_db_factory, | 372 IndexedDBFactory* indexed_db_factory, |
372 const url::Origin& origin, | 373 const url::Origin& origin, |
373 const base::FilePath& path_base, | 374 const base::FilePath& path_base, |
374 net::URLRequestContext* request_context, | 375 net::URLRequestContext* request_context, |
375 blink::WebIDBDataLoss* data_loss, | 376 IndexedDBDataLossInfo* data_loss_info, |
376 std::string* data_loss_message, | |
377 bool* disk_full, | 377 bool* disk_full, |
378 base::SequencedTaskRunner* task_runner, | 378 base::SequencedTaskRunner* task_runner, |
379 bool clean_journal, | 379 bool clean_journal, |
380 leveldb::Status* status); | 380 leveldb::Status* status); |
381 static scoped_refptr<IndexedDBBackingStore> Open( | 381 static scoped_refptr<IndexedDBBackingStore> Open( |
382 IndexedDBFactory* indexed_db_factory, | 382 IndexedDBFactory* indexed_db_factory, |
383 const url::Origin& origin, | 383 const url::Origin& origin, |
384 const base::FilePath& path_base, | 384 const base::FilePath& path_base, |
385 net::URLRequestContext* request_context, | 385 net::URLRequestContext* request_context, |
386 blink::WebIDBDataLoss* data_loss, | 386 IndexedDBDataLossInfo* data_loss_info, |
387 std::string* data_loss_message, | |
388 bool* disk_full, | 387 bool* disk_full, |
389 LevelDBFactory* leveldb_factory, | 388 LevelDBFactory* leveldb_factory, |
390 base::SequencedTaskRunner* task_runner, | 389 base::SequencedTaskRunner* task_runner, |
391 bool clean_journal, | 390 bool clean_journal, |
392 leveldb::Status* status); | 391 leveldb::Status* status); |
393 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 392 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
394 const url::Origin& origin, | 393 const url::Origin& origin, |
395 base::SequencedTaskRunner* task_runner, | 394 base::SequencedTaskRunner* task_runner, |
396 leveldb::Status* status); | 395 leveldb::Status* status); |
397 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( | 396 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 // complete. While > 0, temporary journal entries may exist so out-of-band | 666 // complete. While > 0, temporary journal entries may exist so out-of-band |
668 // journal cleaning must be deferred. | 667 // journal cleaning must be deferred. |
669 size_t committing_transaction_count_; | 668 size_t committing_transaction_count_; |
670 | 669 |
671 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); | 670 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); |
672 }; | 671 }; |
673 | 672 |
674 } // namespace content | 673 } // namespace content |
675 | 674 |
676 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 675 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
OLD | NEW |