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

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

Issue 2623353002: Share schemes needed for mixed content checking between the browser and renderer. (Closed)
Patch Set: remove unused public methods Created 3 years, 11 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/SchemeRegistry.cpp
diff --git a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
index 767e2b160feab7312226741f961e5347fde608c0..8e251f431c77fb3890fdfc1cd5f9bc852028f4d3 100644
--- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
@@ -26,6 +26,7 @@
#include "platform/weborigin/SchemeRegistry.h"
+#include "url/url_util.h"
#include "wtf/ThreadSpecific.h"
#include "wtf/Threading.h"
#include "wtf/ThreadingPrimitives.h"
@@ -38,17 +39,22 @@ namespace {
class URLSchemesRegistry final {
public:
URLSchemesRegistry()
- : localSchemes({"file"}),
- secureSchemes({"https", "about", "data", "wss"}),
- schemesWithUniqueOrigins({"about", "javascript", "data"}),
- emptyDocumentSchemes({"about"}),
- CORSEnabledSchemes({"http", "https", "data"}),
+ : emptyDocumentSchemes({"about"}),
// For ServiceWorker schemes: HTTP is required because http://localhost
// is considered secure. Additional checks are performed to ensure that
// other http pages are filtered out.
serviceWorkerSchemes({"http", "https"}),
fetchAPISchemes({"http", "https"}),
- allowedInReferrerSchemes({"http", "https"}) {}
+ allowedInReferrerSchemes({"http", "https"}) {
+ for (auto& scheme : url::GetLocalSchemes())
+ localSchemes.add(scheme.c_str());
+ for (auto& scheme : url::GetSecureSchemes())
+ secureSchemes.add(scheme.c_str());
+ for (auto& scheme : url::GetNoAccessSchemes())
+ schemesWithUniqueOrigins.add(scheme.c_str());
+ for (auto& scheme : url::GetCORSEnabledSchemes())
+ CORSEnabledSchemes.add(scheme.c_str());
+ }
~URLSchemesRegistry() = default;
URLSchemesSet localSchemes;
« no previous file with comments | « extensions/shell/common/shell_content_client.cc ('k') | third_party/WebKit/Source/web/WebSecurityPolicy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698