Add helper methods to ensure consistent GetSiteForURL() usage.

These changes are primarily to reduce the number of unique
SiteInstanceImpl::GetSiteForURL() call sites to make it easier to
transition these pieces of code to handle default SiteInstance URLs.

- Added BrowsingInstance::GetSiteForURL() helper to ensure all code
  inside the class is using the same method to compute site URLs.

- Added NavigationRequest::GetSiteForCommonParamsURL() to help ensure
  that |site_url_| is consistently updated with a site URL generated
  from common_params_.url.

Bug: 787576
Change-Id: Ife661aa4d10ee649f367dae91bf82e3b364b702a
Reviewed-by: Nasko Oskov <>
Commit-Queue: Aaron Colwell <>
Auto-Submit: Aaron Colwell <>
Cr-Commit-Position: refs/heads/master@{#654068}
4 files changed