Add ScopedObjCClassSwizzler in base/mac, absorbs objc_method_swizzle and ScopedClassSwizzler

ScopedClassSwizzler from ui/test is wanted for new tests where it can't
currently be accessed. It also re-implements a concept in
chrome/common/mac/objc_method_swizzle.*

This change adds base::mac::ScopedObjCClassSwizzler, merges concepts
from objc_method_swizzle, and adjusts chrome_browser_application_mac.mm
to use the new swizzler.

The test from objc_method_swizzle is adapted and extended for the scoped
swizzler.

BUG=378134
TEST=base_unittests

Review URL: https://codereview.chromium.org/345243007

Cr-Commit-Position: refs/heads/master@{#288943}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288943 0039d316-1c4b-4281-b951-d872f2087c98


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