Chromium Code Reviews| Index: url/origin.cc |
| diff --git a/url/origin.cc b/url/origin.cc |
| index d15ba43f8f64f196e47fd540c3e15632c5c3a61a..087dde77a57c5768d3d5764ff65adee8c2463d12 100644 |
| --- a/url/origin.cc |
| +++ b/url/origin.cc |
| @@ -159,6 +159,18 @@ GURL Origin::GetURL() const { |
| return tuple_url; |
| } |
| +GURL Origin::GetURLWithoutSuborigin() const { |
| + if (unique()) |
| + return GURL(); |
| + |
| + if (scheme() == kFileScheme) |
| + return GURL("file:///"); |
| + |
| + GURL tuple_url(tuple_.GetURL()); |
| + |
| + return tuple_url; |
| +} |
|
Mike West
2017/05/26 11:45:35
+Jochen, who's responsible for suborigins these da
jochen (gone - plz use gerrit)
2017/05/26 11:51:53
why not use origin->GetPhysicalOrigin().GetURL() ?
nrpeter
2017/05/26 15:50:24
Good point, I'll switch to GetPhysicalOrigin().Get
|
| + |
| bool Origin::IsSameOriginWith(const Origin& other) const { |
| if (unique_ || other.unique_) |
| return false; |