Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp

Issue 2391383003: Add Origin::CreateFromNormalizedTuple and call from WebSecurityOrigin (Closed)
Patch Set: loosen checks Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp b/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
index 812fc30e30b514a4a417bfda0d8d7f36cfe80fba..d8850e43a338f7c885f6d5339d96f3290bdc62e7 100644
--- a/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp
@@ -47,6 +47,8 @@ bool isDefaultPortForProtocol(unsigned short port,
return protocol == "ftp";
case 990:
return protocol == "ftps";
+ case 70:
+ return protocol == "gopher";
Mike West 2016/10/11 08:38:33 This seems unrelated? Moreover, we don't actually
ncarter (slow) 2016/10/11 18:21:52 Agree, we don't handle gopher, and won't ever. I'v
}
return false;
}
@@ -60,6 +62,8 @@ unsigned short defaultPortForProtocol(const WTF::String& protocol) {
return 21;
if (protocol == "ftps")
return 990;
+ if (protocol == "gopher")
+ return 70;
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698