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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.h

Issue 2245833003: Indexed DB: Hold BlobChangeRecords in maps using smart pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@idb-unique
Patch Set: No implicit copy/assign Created 4 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_backing_store.h
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index 4455bd835574915659265c25acc64b6be702a242..c5a28e034f9d8490009131b955461f2cb159151b 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -259,8 +259,9 @@ class CONTENT_EXPORT IndexedDBBackingStore
IndexedDBBackingStore* backing_store_;
scoped_refptr<LevelDBTransaction> transaction_;
- std::map<std::string, BlobChangeRecord*> blob_change_map_;
- std::map<std::string, BlobChangeRecord*> incognito_blob_map_;
+ std::map<std::string, std::unique_ptr<BlobChangeRecord>> blob_change_map_;
+ std::map<std::string, std::unique_ptr<BlobChangeRecord>>
+ incognito_blob_map_;
int64_t database_id_;
// List of blob files being newly written as part of this transaction.
@@ -278,6 +279,8 @@ class CONTENT_EXPORT IndexedDBBackingStore
// indicate that the committing_transaction_count_ on the backing store
// has been bumped, and journal cleaning should be deferred.
bool committing_;
+
+ DISALLOW_COPY_AND_ASSIGN(Transaction);
};
class Cursor {
@@ -652,7 +655,7 @@ class CONTENT_EXPORT IndexedDBBackingStore
net::URLRequestContext* request_context_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
std::set<int> child_process_ids_granted_;
- std::map<std::string, BlobChangeRecord*> incognito_blob_map_;
+ std::map<std::string, std::unique_ptr<BlobChangeRecord>> incognito_blob_map_;
base::OneShotTimer journal_cleaning_timer_;
std::unique_ptr<LevelDBDatabase> db_;
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698