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

Side by Side Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 2647283007: Add deprecation messages for blocked subresource types. (Closed)
Patch Set: Moar tests. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/Deprecation.h" 5 #include "core/frame/Deprecation.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/ExecutionContext.h" 8 #include "core/dom/ExecutionContext.h"
9 #include "core/frame/FrameConsole.h" 9 #include "core/frame/FrameConsole.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 case UseCounter::GetMatchedCSSRules: 256 case UseCounter::GetMatchedCSSRules:
257 return "'getMatchedCSSRules()' is deprecated. For more help, check " 257 return "'getMatchedCSSRules()' is deprecated. For more help, check "
258 "https://code.google.com/p/chromium/issues/detail?id=437569#c2"; 258 "https://code.google.com/p/chromium/issues/detail?id=437569#c2";
259 259
260 case UseCounter::PrefixedWindowURL: 260 case UseCounter::PrefixedWindowURL:
261 return replacedBy("'webkitURL'", "'URL'"); 261 return replacedBy("'webkitURL'", "'URL'");
262 262
263 case UseCounter::RangeExpand: 263 case UseCounter::RangeExpand:
264 return replacedBy("'Range.expand()'", "'Selection.modify()'"); 264 return replacedBy("'Range.expand()'", "'Selection.modify()'");
265 265
266 // Blocked subresource requests:
267 case UseCounter::LegacyProtocolEmbeddedAsSubresource:
268 return String::format(
269 "Subresource requests using legacy protocols (like `ftp:`) are "
270 "deprecated, and will be blocked in %s. Please deliver "
271 "web-accessible resources over modern protocols like HTTPS. "
272 "See https://www.chromestatus.com/feature/5709390967472128 for more "
273 "details.",
274 milestoneString(M59));
275
276 case UseCounter::RequestedSubresourceWithEmbeddedCredentials:
277 return String::format(
278 "Subresource requests whose URLs contain embedded credentials (e.g. "
279 "`https://user:pass@host/`) are deprecated, and will be blocked in "
280 "%s. See https://www.chromestatus.com/feature/5669008342777856 for "
281 "more details.",
282 milestoneString(M59));
283
266 // Powerful features on insecure origins (https://goo.gl/rStTGz) 284 // Powerful features on insecure origins (https://goo.gl/rStTGz)
267 case UseCounter::DeviceMotionInsecureOrigin: 285 case UseCounter::DeviceMotionInsecureOrigin:
268 return "The devicemotion event is deprecated on insecure origins, and " 286 return "The devicemotion event is deprecated on insecure origins, and "
269 "support will be removed in the future. You should consider " 287 "support will be removed in the future. You should consider "
270 "switching your application to a secure origin, such as HTTPS. " 288 "switching your application to a secure origin, such as HTTPS. "
271 "See https://goo.gl/rStTGz for more details."; 289 "See https://goo.gl/rStTGz for more details.";
272 290
273 case UseCounter::DeviceOrientationInsecureOrigin: 291 case UseCounter::DeviceOrientationInsecureOrigin:
274 return "The deviceorientation event is deprecated on insecure origins, " 292 return "The deviceorientation event is deprecated on insecure origins, "
275 "and support will be removed in the future. You should consider " 293 "and support will be removed in the future. You should consider "
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 "-internal-media-controls-text-track-list* selectors", M59, 425 "-internal-media-controls-text-track-list* selectors", M59,
408 "5661431349379072"); 426 "5661431349379072");
409 427
410 // Features that aren't deprecated don't have a deprecation message. 428 // Features that aren't deprecated don't have a deprecation message.
411 default: 429 default:
412 return String(); 430 return String();
413 } 431 }
414 } 432 }
415 433
416 } // namespace blink 434 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698