More safely cast to Profile

The motivation here is that I hit this invalid cast in a test, and it resulted
in an empty callstack which was painful to debug. Profile::FromBrowserContext
DCHECKs in a more friendly way.

Change-Id: I5e1f423c66abbdce0604a6cfdbf8d4c988dde2af
Reviewed-on: https://chromium-review.googlesource.com/1155259
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579160}
1 file changed