Give extensions with isolated storage correct StoragePartition IDs
Give extensions with isolated storage correct StoragePartition IDs

ChromeContentBrowserClient::GetStoragePartitionConfigForSite() separates the
StoragePartition configs of extensions with isolated storage from those of
vanilla sites. However,
ChromeContentBrowserClient::GetStoragePartitionIDForSite() conflates the two,
returning the empty string for both. This conflation can lead to the //content
layer being unable to distinguish between actions taken in the context of a
StoragePartition for an isolated extension and subsequent actions being taken
in the context of a StoragePartition in a vanilla site for that same tab (see
bugs for detailed examples).

This CL changes ChromeContentBrowserClient::GetStoragePartitionIDForSite() to
return the site spec as the storage partition ID for an extension with isolated
storage, similar to the behavior of
ChromeContentBrowserClient::GetStoragePartitionConfigForSite().

BUG=583309,568439,583269
TEST=Execute the steps in c#33 of crbug.com/568439. The tab should not be
killed.

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

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#374100}

axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk