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

Unified Diff: Source/core/frame/UseCounter.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/core/frame/UseCounter.cpp
diff --git a/Source/core/frame/UseCounter.cpp b/Source/core/frame/UseCounter.cpp
index 7cce5a0ef4b188f6b95262f9673cede6dd469b05..a35b5de48de1d1500a79b8ab3ae48a9b8d5ba0dd 100644
--- a/Source/core/frame/UseCounter.cpp
+++ b/Source/core/frame/UseCounter.cpp
@@ -899,6 +899,22 @@ String UseCounter::deprecationMessage(Feature feature)
case CSSKeyframesRuleInsertRule:
return "'CSSKeyframesRule.insertRule()' is deprecated and will be removed in M45, around August 2015. Please use 'CSSKeyframesRule.appendRule()' instead.";
+ // Powerful features on insecure origins (https://goo.gl/rStTGz)
+ case GeolocationInsecureOrigin:
+ return "Geolocation via getCurrentPosition() and watchPosition() will be deprecated over insecure origins in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.";
+
+ case GetUserMediaInsecureOrigin:
+ return "getUserMedia() will be deprecated over insecure origins in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.";
+
+ case DeviceMotionInsecureOrigin:
philipj_slow 2015/05/01 22:36:58 The DeviceMotionInsecureOrigin and DeviceOrientati
jww 2015/05/05 21:29:53 That's a great point, and my mistake for not check
philipj_slow 2015/05/06 07:43:55 Thanks!
+ return "The 'devicemotion' event will be deprecated over insecure origins in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.";
+
+ case DeviceOrientationInsecureOrigin:
+ return "The 'deviceorientation' event will be deprecated over insecure origins in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.";
+
+ case FullscreenInsecureOrigin:
+ return "requestFullscreen() will be deprecated over insecure origins in the future. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.";
+
// Features that aren't deprecated don't have a deprecation message.
default:
return String();

Powered by Google App Engine
This is Rietveld 408576698