Restrict CanAccessDataForOrigin() calls to the UI and IO threads.

- Adding DCHECK to make sure CanAccessDataForOrigin() is only called
  on the UI or IO thread. This is needed for future CLs that will need
  to use information in the BrowserContext or ResourceContext to
  determine if data access is allowed.
- Fix existing code that was calling CanAccessDataForOrigin() on
  worker threads so that it doesn't trigger the new DCHECK.

Bug: 898281
Change-Id: I03ab137dad3fcec5c7c2152855816156489f91c0
Reviewed-on: https://chromium-review.googlesource.com/c/1359463
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614785}
9 files changed