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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 virtual void Begin(); | 400 virtual void Begin(); |
401 // The callback will be called eventually on success or failure, or | 401 // The callback will be called eventually on success or failure, or |
402 // immediately if phase one is complete due to lack of any blobs to write. | 402 // immediately if phase one is complete due to lack of any blobs to write. |
403 virtual leveldb::Status CommitPhaseOne(scoped_refptr<BlobWriteCallback>); | 403 virtual leveldb::Status CommitPhaseOne(scoped_refptr<BlobWriteCallback>); |
404 virtual leveldb::Status CommitPhaseTwo(); | 404 virtual leveldb::Status CommitPhaseTwo(); |
405 virtual void Rollback(); | 405 virtual void Rollback(); |
406 void Reset() { | 406 void Reset() { |
407 backing_store_ = NULL; | 407 backing_store_ = NULL; |
408 transaction_ = NULL; | 408 transaction_ = NULL; |
409 } | 409 } |
| 410 leveldb::Status PutBlobInfoIfNeeded( |
| 411 int64 database_id, |
| 412 int64 object_store_id, |
| 413 const std::string& object_store_data_key, |
| 414 std::vector<IndexedDBBlobInfo>*, |
| 415 ScopedVector<webkit_blob::BlobDataHandle>* handles); |
410 void PutBlobInfo(int64 database_id, | 416 void PutBlobInfo(int64 database_id, |
411 int64 object_store_id, | 417 int64 object_store_id, |
412 const std::string& object_store_data_key, | 418 const std::string& object_store_data_key, |
413 std::vector<IndexedDBBlobInfo>*, | 419 std::vector<IndexedDBBlobInfo>*, |
414 ScopedVector<webkit_blob::BlobDataHandle>* handles); | 420 ScopedVector<webkit_blob::BlobDataHandle>* handles); |
415 | 421 |
416 LevelDBTransaction* transaction() { return transaction_; } | 422 LevelDBTransaction* transaction() { return transaction_; } |
417 | 423 |
418 leveldb::Status GetBlobInfoForRecord( | 424 leveldb::Status GetBlobInfoForRecord( |
419 int64 database_id, | 425 int64 database_id, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 // will hold a reference to this backing store. | 573 // will hold a reference to this backing store. |
568 IndexedDBActiveBlobRegistry active_blob_registry_; | 574 IndexedDBActiveBlobRegistry active_blob_registry_; |
569 base::OneShotTimer<IndexedDBBackingStore> close_timer_; | 575 base::OneShotTimer<IndexedDBBackingStore> close_timer_; |
570 | 576 |
571 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); | 577 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); |
572 }; | 578 }; |
573 | 579 |
574 } // namespace content | 580 } // namespace content |
575 | 581 |
576 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ | 582 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ |
OLD | NEW |