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

Unified Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 1942003002: Fix geolocation removal from insecure contexts console message (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Rebase on ToT Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 036b29e820c6a6426612f9dea719ddb00a1122c2..efdb860a03b604b053a2dcc6507b1a5393f3035a 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -155,6 +155,14 @@ void Geolocation::recordOriginTypeAccess() const
if (document->isSecureContext(insecureOriginMsg)) {
UseCounter::count(document, UseCounter::GeolocationSecureOrigin);
UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSecureOriginIframe);
+ } else if (frame()->settings()->allowGeolocationOnInsecureOrigins()) {
+ // TODO(jww): This should be removed after WebView is fixed so that it
+ // disallows geolocation in insecure contexts.
+ //
+ // See https://crbug.com/603574.
+ Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureOriginDeprecatedNotRemoved);
+ Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::GeolocationInsecureOriginIframeDeprecatedNotRemoved);
+ OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Feature::GeolocationInsecureOrigin);
} else {
Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureOrigin);
Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::GeolocationInsecureOriginIframe);
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698