Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(974)

Side by Side Diff: content/browser/indexed_db/indexed_db_backing_store.h

Issue 2472213003: [IndexedDB] Refactoring to remove ref ptrs and host transaction ids. (Closed)
Patch Set: comments & rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <utility> 15 #include <utility>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/files/file_path.h" 18 #include "base/files/file_path.h"
19 #include "base/gtest_prod_util.h" 19 #include "base/gtest_prod_util.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h"
22 #include "base/strings/string_piece.h" 23 #include "base/strings/string_piece.h"
23 #include "base/time/time.h" 24 #include "base/time/time.h"
24 #include "base/timer/timer.h" 25 #include "base/timer/timer.h"
25 #include "content/browser/indexed_db/indexed_db.h" 26 #include "content/browser/indexed_db/indexed_db.h"
26 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h" 27 #include "content/browser/indexed_db/indexed_db_active_blob_registry.h"
27 #include "content/browser/indexed_db/indexed_db_blob_info.h" 28 #include "content/browser/indexed_db/indexed_db_blob_info.h"
28 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h" 29 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
29 #include "content/browser/indexed_db/leveldb/leveldb_iterator.h" 30 #include "content/browser/indexed_db/leveldb/leveldb_iterator.h"
30 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h" 31 #include "content/browser/indexed_db/leveldb/leveldb_transaction.h"
31 #include "content/common/content_export.h" 32 #include "content/common/content_export.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // be added to either the primary or live blob journal as appropriate 276 // be added to either the primary or live blob journal as appropriate
276 // following a successful commit. 277 // following a successful commit.
277 BlobJournalType blobs_to_remove_; 278 BlobJournalType blobs_to_remove_;
278 scoped_refptr<ChainedBlobWriter> chained_blob_writer_; 279 scoped_refptr<ChainedBlobWriter> chained_blob_writer_;
279 280
280 // Set to true between CommitPhaseOne and CommitPhaseTwo/Rollback, to 281 // Set to true between CommitPhaseOne and CommitPhaseTwo/Rollback, to
281 // indicate that the committing_transaction_count_ on the backing store 282 // indicate that the committing_transaction_count_ on the backing store
282 // has been bumped, and journal cleaning should be deferred. 283 // has been bumped, and journal cleaning should be deferred.
283 bool committing_; 284 bool committing_;
284 285
286 base::WeakPtrFactory<Transaction> ptr_factory_;
287
285 DISALLOW_COPY_AND_ASSIGN(Transaction); 288 DISALLOW_COPY_AND_ASSIGN(Transaction);
286 }; 289 };
287 290
288 class Cursor { 291 class Cursor {
289 public: 292 public:
290 enum IteratorState { READY = 0, SEEK }; 293 enum IteratorState { READY = 0, SEEK };
291 294
292 virtual ~Cursor(); 295 virtual ~Cursor();
293 296
294 struct CursorOptions { 297 struct CursorOptions {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 // complete. While > 0, temporary journal entries may exist so out-of-band 688 // complete. While > 0, temporary journal entries may exist so out-of-band
686 // journal cleaning must be deferred. 689 // journal cleaning must be deferred.
687 size_t committing_transaction_count_; 690 size_t committing_transaction_count_;
688 691
689 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); 692 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore);
690 }; 693 };
691 694
692 } // namespace content 695 } // namespace content
693 696
694 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ 697 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698