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

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

Issue 2233153002: IndexedDB: WrapUnique(new T(args..)) -> MakeUnique<T>(args...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback 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_class_factory.h
diff --git a/content/browser/indexed_db/indexed_db_class_factory.h b/content/browser/indexed_db/indexed_db_class_factory.h
index fb4f1d7eab2fdf28c3a409e6921aa38f93129431..60f069e6c9668e39fe29e5a52e7f77d991b89e16 100644
--- a/content/browser/indexed_db/indexed_db_class_factory.h
+++ b/content/browser/indexed_db/indexed_db_class_factory.h
@@ -11,6 +11,7 @@
#include <set>
#include "base/lazy_instance.h"
+#include "base/memory/ref_counted.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
#include "content/browser/indexed_db/indexed_db_database.h"
#include "content/common/content_export.h"
@@ -41,7 +42,7 @@ class CONTENT_EXPORT IndexedDBClassFactory {
static void SetIndexedDBClassFactoryGetter(GetterCallback* cb);
- virtual IndexedDBDatabase* CreateIndexedDBDatabase(
+ virtual scoped_refptr<IndexedDBDatabase> CreateIndexedDBDatabase(
const base::string16& name,
IndexedDBBackingStore* backing_store,
IndexedDBFactory* factory,
@@ -54,9 +55,11 @@ class CONTENT_EXPORT IndexedDBClassFactory {
blink::WebIDBTransactionMode mode,
IndexedDBBackingStore::Transaction* backing_store_transaction);
- virtual LevelDBIteratorImpl* CreateIteratorImpl(
+ virtual std::unique_ptr<LevelDBIteratorImpl> CreateIteratorImpl(
std::unique_ptr<leveldb::Iterator> iterator);
- virtual LevelDBTransaction* CreateLevelDBTransaction(LevelDBDatabase* db);
+
+ virtual scoped_refptr<LevelDBTransaction> CreateLevelDBTransaction(
+ LevelDBDatabase* db);
protected:
IndexedDBClassFactory() {}

Powered by Google App Engine
This is Rietveld 408576698