mac: History swipe arrow disappears slowly with magic mouse.

The history swipe arrow was being dismissed at the wrong time. It should be
dismissed as soon as the browser begins to navigate forwards or backwards. It
was being dismissed when the gesture completed, which takes ~1 second longer,
due to momentum swipe events that keep coming in after a user has let go.

This bug came from an incorrect revival of previously deleted code. This CL
fixes the newly introduced bug, but introduces a behavioral change.  There are
3 possible end conditions for the history swipe:
1. PhaseEnded & navigation occurs
2. PhaseEnded & no navigation occurs
3. PhaseCancelled, no navigation occurs

There's no way for the user to differentiate 2&3, so the behavior between them
should be consistent. In the dead code, 1&2 had an animated dismissal of the
arrow, whereas 3 had an instant dismissal of the arrow. In this patch, I've
unified the logic to always use an animated dismissal of the arrow.

BUG=338206

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254997 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 254997
Add GarbageCollectedMixin as a GC base.

BUG=334149
R=ager@chromium.org, vegorov@chromium.org, thakis@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254998 0039d316-1c4b-4281-b951-d872f2087c98
Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get.

Move it to extensions/browser. (Not extensions/browser/api, since it's now being used not just by API implementations.)

This change is purely mechanical (some lines are more affected by clang-format than others).

BUG=309909
TBR=sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254999 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 254999