| Index: url/gurl.cc
|
| diff --git a/url/gurl.cc b/url/gurl.cc
|
| index b7374b1f20e87a47fd372dd0861edff9db172d5c..b5801254069eb3e50d749c94fe9a082fd9a701af 100644
|
| --- a/url/gurl.cc
|
| +++ b/url/gurl.cc
|
| @@ -322,8 +322,10 @@ GURL GURL::GetOrigin() const {
|
| }
|
|
|
| GURL GURL::GetAsReferrer() const {
|
| - if (!is_valid_ ||
|
| - (!has_ref() && !has_username() && !has_password()))
|
| + if (!is_valid_ || !SchemeIsHTTPOrHTTPS())
|
| + return GURL();
|
| +
|
| + if (!has_ref() && !has_username() && !has_password())
|
| return GURL(*this);
|
|
|
| url::Replacements<char> replacements;
|
|
|