Chromium Code Reviews| 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 6adbe8c19a6d04d7c9df687ee0137ababd01d342..767e2b160feab7312226741f961e5347fde608c0 100644 |
| --- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp |
| +++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp |
| @@ -238,6 +238,18 @@ bool SchemeRegistry::shouldTreatURLSchemeAsLegacy(const String& scheme) { |
| return scheme == "ftp" || scheme == "gopher"; |
| } |
| +bool SchemeRegistry::shouldTrackUsageMetricsForScheme(const String& scheme) { |
| + // The scheme represents content which likely cannot be easily updated. |
| + // Specifically this includes internal pages such as about, chrome-devtools, |
| + // etc. |
| + // "chrome-extension" is not included because they have a single deployment |
| + // point (the webstore) and are designed specifically for Chrome. |
| + // "data" is not included because real sites shouldn't be using it for |
|
PhistucK
2016/12/24 08:19:26
I have seen data: used as a top level browsing con
|
| + // top-level |
| + // pages and Chrome does use it internally (eg. PluginPlaceholder). |
| + return scheme == "http" || scheme == "https" || scheme == "file"; |
| +} |
| + |
| void SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers( |
| const String& scheme) { |
| DCHECK_EQ(scheme, scheme.lower()); |