Both, but mostly dumbbell. Can get a better stretch at the bottom as well as squeezing the chest together at the top to get a bit of the benefit of a fly as well. When doing reps I like to not lockout at the top to keep tension on the chest the whole time.
But I almost always do a couple sets of barbell presses as well cuz, well I'm a guy and I like them.
Edit: Also another great reason to prefer dumb bell work is working each side independently. After a bad shoulder injury I started pressing again neglecting my dumb bell work and my strong side was preventing my weak side from progressing. After starting dumb bell work again it was obvious that I had a vastly weaker side and after a couple of months focusing on dumb bells I brought that weak side right back up to where it should be.