Index: content/child/site_isolation_stats_gatherer.cc |
diff --git a/content/child/site_isolation_stats_gatherer.cc b/content/child/site_isolation_stats_gatherer.cc |
index 1cdea5ff8c0fac323dc97befb300d24ae28d2ba6..aeea241a06e6a86615854fff414aa39ce3e73655 100644 |
--- a/content/child/site_isolation_stats_gatherer.cc |
+++ b/content/child/site_isolation_stats_gatherer.cc |
@@ -98,7 +98,7 @@ void SiteIsolationStatsGatherer::SetEnabled(bool enabled) { |
std::unique_ptr<SiteIsolationResponseMetaData> |
SiteIsolationStatsGatherer::OnReceivedResponse( |
- const GURL& frame_origin, |
+ const url::Origin& frame_origin, |
const GURL& response_url, |
ResourceType resource_type, |
int origin_pid, |
@@ -124,7 +124,10 @@ SiteIsolationStatsGatherer::OnReceivedResponse( |
if (!CrossSiteDocumentClassifier::IsBlockableScheme(response_url)) |
return nullptr; |
- if (CrossSiteDocumentClassifier::IsSameSite(frame_origin, response_url)) |
+ // TODO(csharrison): Add a path for IsSameSite/IsValidCorsHeaderSet to take an |
+ // Origin. |
ncarter (slow)
2016/12/08 21:39:49
Another option here is to delete this class, or en
Charlie Harrison
2016/12/08 21:57:33
I think once the CL I referenced lands, it will be
|
+ GURL frame_origin_url = frame_origin.GetURL(); |
+ if (CrossSiteDocumentClassifier::IsSameSite(frame_origin_url, response_url)) |
return nullptr; |
CrossSiteDocumentMimeType canonical_mime_type = |
@@ -143,7 +146,7 @@ SiteIsolationStatsGatherer::OnReceivedResponse( |
info.headers->EnumerateHeader(NULL, "access-control-allow-origin", |
&access_control_origin); |
if (CrossSiteDocumentClassifier::IsValidCorsHeaderSet( |
- frame_origin, response_url, access_control_origin)) |
+ frame_origin_url, response_url, access_control_origin)) |
return nullptr; |
// Real XSD data collection starts from here. |
@@ -152,7 +155,7 @@ SiteIsolationStatsGatherer::OnReceivedResponse( |
std::unique_ptr<SiteIsolationResponseMetaData> resp_data( |
new SiteIsolationResponseMetaData); |
- resp_data->frame_origin = frame_origin.spec(); |
+ resp_data->frame_origin = frame_origin_url.spec(); |
resp_data->response_url = response_url; |
resp_data->resource_type = resource_type; |
resp_data->canonical_mime_type = canonical_mime_type; |