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

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

Issue 1115913002: Add deprecation warnings to old powerful features on insecure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updates from nits Created 5 years, 8 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: Source/modules/geolocation/Geolocation.cpp
diff --git a/Source/modules/geolocation/Geolocation.cpp b/Source/modules/geolocation/Geolocation.cpp
index 315053dd0080901e1f94ec5aeb86314297402cee..59a8a3d91aa38c11cec7ab7e1dd792dd387f4182 100644
--- a/Source/modules/geolocation/Geolocation.cpp
+++ b/Source/modules/geolocation/Geolocation.cpp
@@ -152,10 +152,10 @@ void Geolocation::recordOriginTypeAccess() const
// actually used. This could be used later if a warning is shown in the
// developer console.
String insecureOriginMsg;
- UseCounter::Feature counter = document->isPrivilegedContext(insecureOriginMsg)
- ? UseCounter::GeolocationSecureOrigin
- : UseCounter::GeolocationInsecureOrigin;
- UseCounter::count(document, counter);
+ if (document->isPrivilegedContext(insecureOriginMsg))
+ UseCounter::count(document, UseCounter::GeolocationSecureOrigin);
+ else
+ UseCounter::countDeprecation(document, UseCounter::GeolocationInsecureOrigin);
}
void Geolocation::getCurrentPosition(PositionCallback* successCallback, PositionErrorCallback* errorCallback, const PositionOptions& options)

Powered by Google App Engine
This is Rietveld 408576698