Index: url/origin.cc |
diff --git a/url/origin.cc b/url/origin.cc |
index a14c8918d35bfbf4430d0d5c5d7ebee577639f95..68f978e8fd640025eb161aca57b6d83fda64fe23 100644 |
--- a/url/origin.cc |
+++ b/url/origin.cc |
@@ -17,6 +17,12 @@ |
namespace url { |
+namespace { |
+ |
+const char kRootFileUrl[] = "file:///"; |
+ |
+} // namespace |
+ |
Origin::Origin() : unique_(true) { |
} |
@@ -60,11 +66,21 @@ std::string Origin::Serialize() const { |
return "null"; |
if (scheme() == kFileScheme) |
- return "file://"; |
+ return kRootFileUrl; |
brettw
2016/10/03 18:56:34
It looks like this returns the new "file:///" inst
|
return tuple_.Serialize(); |
} |
+GURL Origin::GetURL() const { |
+ if (unique()) |
+ return GURL(); |
+ |
+ if (scheme() == kFileScheme) |
+ return GURL(kRootFileUrl); |
+ |
+ return tuple_.GetURL(); |
+} |
+ |
bool Origin::IsSameOriginWith(const Origin& other) const { |
if (unique_ || other.unique_) |
return false; |