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

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: 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
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 58f699c2236c0e347d65b67ba07c68acc80bf93a..2b91cdb7d81e9bc4be7a6a935ac58cff42d11579 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.
@@ -652,7 +653,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_;

Powered by Google App Engine
This is Rietveld 408576698