Chromium Code Reviews| Index: url/origin.cc |
| diff --git a/url/origin.cc b/url/origin.cc |
| index a14c8918d35bfbf4430d0d5c5d7ebee577639f95..008e5ec97ad3e08115ed210d7d10ff8090d3a141 100644 |
| --- a/url/origin.cc |
| +++ b/url/origin.cc |
| @@ -65,6 +65,16 @@ std::string Origin::Serialize() const { |
| return tuple_.Serialize(); |
| } |
| +GURL Origin::GetURL() const { |
| + if (unique()) |
| + return GURL(); |
| + |
| + if (scheme() == kFileScheme) |
| + return GURL("file://"); |
|
brettw
2016/09/30 20:18:48
1. We should have a constant for this so we don't
Charlie Harrison
2016/10/03 17:28:47
Done.
|
| + |
| + return tuple_.GetURL(); |
| +} |
| + |
| bool Origin::IsSameOriginWith(const Origin& other) const { |
| if (unique_ || other.unique_) |
| return false; |