Add |IsNotIn| EraseIf-helper and convert to in-place set-intersection

There are a few places where the Omnibox and friends need set-intersection
but they currently construct a new set doing so. With EraseIf and this
IsNotIn helper, it's trivial to do in-place set-intersection. It showed a
20% improvement under micro-benchmarks.

This patch includes an existing Omnibox conversion, plus one under
components/bookmarks.

Bug: 775805
Change-Id: Ic15b5d97c4c04ada4b1e70a3ad159d07909874ec
Reviewed-on: https://chromium-review.googlesource.com/726001
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Kevin Bailey <krb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511864}

CrOS-Libchrome-Original-Commit: 156ff6d76e1b9e7508f005da986eda27729224d2
2 files changed
tree: e4679fe1280d1bf02dcca7110e2bf5fada5e122f
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/