Whose responsibility to detect plagiarism during peer review: editor or referee?
Well, we now have two opposing views, so I'll add a third: Neither.

I don't think that either the editor or the reviewer has a responsibility to try to detect plagiarism.  When I read a journal, I don't assume that anyone has taken explicit steps to check for plagiarism.  I don't see it as incumbent on either of them to take steps like matching against a database of previous papers (indeed I think such things cause more trouble than they are worth; see arXiv's "textual overlap" detector).

If a plagiarized paper should make it into print, I blame the author, but I don't blame the editor or referee for not catching it.  They are victims of the plagiarist, along with the rest of the community.

The referee is typically asked to judge the novelty of the paper, so they should be reasonably familiar with the existing literature (if not, they should decline to review the paper).  If the paper seems very reminiscent of a paper they've seen before, then they should certainly compare them, but not so much to check for plagiarism as to better understand the innovations of the new paper.

That said, the referee certainly has a responsibility to report plagiarism if they do notice it, and the editor has a responsibility to thoroughly investigate any reports or allegations of plagiarism, and take prompt and decisive action if warranted.