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

Issue 2233153002: IndexedDB: WrapUnique(new T(args..)) -> MakeUnique<T>(args...) (Closed)

Created:
4 years, 4 months ago by jsbell
Modified:
4 years, 4 months ago
Reviewers:
cmumford
CC:
chromium-reviews, jam, jsbell+idb_chromium.org, darin-cc_chromium.org, cmumford
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IndexedDB: WrapUnique(new T(args...)) -> MakeUnique<T>(args...) Get on the base::MakeUnique bandwagon, both replacing bad uses of WrapUnique and eliminating bare `new` invocations Also change several factory methods to return unique_ptr or scoped_refptr instead of raw pointers, and replace some manually managed pointers in maps with smart pointers. WrapUnique() is used in cases with private constructors. R=cmumford@chromium.org Committed: https://crrev.com/7017da4baf8aff83269ab72a34737143c6d9d96b Cr-Commit-Position: refs/heads/master@{#412222}

Patch Set 1 #

Total comments: 1

Patch Set 2 : MOAR MakeUnique calls #

Total comments: 9

Patch Set 3 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -179 lines) Patch
M content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store.cc View 1 2 14 chunks +29 lines, -16 lines 0 comments Download
M content/browser/indexed_db/indexed_db_backing_store_unittest.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_class_factory.h View 1 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/indexed_db/indexed_db_class_factory.cc View 1 3 chunks +11 lines, -7 lines 0 comments Download
M content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_context_impl.cc View 1 5 chunks +14 lines, -9 lines 0 comments Download
M content/browser/indexed_db/indexed_db_cursor.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_database.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database.cc View 1 2 5 chunks +12 lines, -12 lines 0 comments Download
M content/browser/indexed_db/indexed_db_database_unittest.cc View 1 6 chunks +7 lines, -7 lines 0 comments Download
M content/browser/indexed_db/indexed_db_dispatcher_host.cc View 1 2 11 chunks +16 lines, -20 lines 0 comments Download
M content/browser/indexed_db/indexed_db_factory_unittest.cc View 1 15 chunks +39 lines, -38 lines 0 comments Download
M content/browser/indexed_db/indexed_db_index_writer.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/indexed_db/indexed_db_leveldb_coding.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction.cc View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M content/browser/indexed_db/indexed_db_transaction_unittest.cc View 1 7 chunks +14 lines, -7 lines 0 comments Download
M content/browser/indexed_db/indexed_db_unittest.cc View 1 3 chunks +7 lines, -7 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_database.cc View 1 7 chunks +14 lines, -11 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/indexed_db/leveldb/leveldb_transaction.cc View 1 2 4 chunks +4 lines, -12 lines 0 comments Download
M content/browser/indexed_db/list_set_unittest.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h View 1 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.cc View 1 4 chunks +8 lines, -6 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (18 generated)
jsbell
cmumford@ - please take a look?
4 years, 4 months ago (2016-08-10 21:17:29 UTC) #3
cmumford
There are some other places, like MakeIndexWriters, which are creating unique_ptr's, but weren't using WrapUnique. ...
4 years, 4 months ago (2016-08-10 23:03:47 UTC) #5
jsbell
cmumford@ - please take a look? asan/lsan clean for content_unittests and content_browsertests I filed https://crbug.com/637019 ...
4 years, 4 months ago (2016-08-12 21:52:21 UTC) #14
cmumford
https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/indexed_db_backing_store.cc File content/browser/indexed_db/indexed_db_backing_store.cc (right): https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/indexed_db_backing_store.cc#newcode1121 content/browser/indexed_db/indexed_db_backing_store.cc:1121: std::unique_ptr<LevelDBComparator> comparator(base::MakeUnique<Comparator>()); I know this is nothing new in ...
4 years, 4 months ago (2016-08-13 00:08:39 UTC) #15
jsbell
Thanks - one more look cmumford@ ? https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/indexed_db_backing_store.cc File content/browser/indexed_db/indexed_db_backing_store.cc (right): https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/indexed_db_backing_store.cc#newcode1121 content/browser/indexed_db/indexed_db_backing_store.cc:1121: std::unique_ptr<LevelDBComparator> comparator(base::MakeUnique<Comparator>()); ...
4 years, 4 months ago (2016-08-16 03:05:28 UTC) #17
jsbell
https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h File content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h (right): https://codereview.chromium.org/2233153002/diff/20001/content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h#newcode49 content/browser/indexed_db/mock_browsertest_indexed_db_class_factory.h:49: IndexedDBTransaction* CreateIndexedDBTransaction( On 2016/08/16 03:05:28, jsbell (slow thru Aug ...
4 years, 4 months ago (2016-08-16 05:22:19 UTC) #21
cmumford
lgtm
4 years, 4 months ago (2016-08-16 12:10:31 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2233153002/40001
4 years, 4 months ago (2016-08-16 13:03:47 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-16 13:07:31 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 13:09:08 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7017da4baf8aff83269ab72a34737143c6d9d96b
Cr-Commit-Position: refs/heads/master@{#412222}

Powered by Google App Engine
This is Rietveld 408576698