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

Unified Diff: content/browser/indexed_db/indexed_db_unittest.cc

Issue 2104383002: Avoid using a cast for a overload selection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to land Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_unittest.cc b/content/browser/indexed_db/indexed_db_unittest.cc
index ea958de168bacf12b03c5ebea89aca98b59a6350..b3736a50ce0fa3dc39cd37e4e92bdee9f0a9b764 100644
--- a/content/browser/indexed_db/indexed_db_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_unittest.cc
@@ -247,11 +247,11 @@ TEST_F(IndexedDBTest, DeleteFailsIfDirectoryLocked) {
ASSERT_TRUE(lock);
// TODO(jsbell): Remove static_cast<> when overloads are eliminated.
jsbell 2016/07/07 16:49:05 Would have been nice to eliminate the comment too.
+ void (IndexedDBContextImpl::* delete_for_origin)(const Origin&) =
+ &IndexedDBContextImpl::DeleteForOrigin;
idb_context->TaskRunner()->PostTask(
FROM_HERE,
- base::Bind(static_cast<void (IndexedDBContextImpl::*)(const Origin&)>(
- &IndexedDBContextImpl::DeleteForOrigin),
- idb_context, kTestOrigin));
+ base::Bind(delete_for_origin, idb_context, kTestOrigin));
FlushIndexedDBTaskRunner();
EXPECT_TRUE(base::DirectoryExists(test_path));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698