Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| 11 #include "core/inspector/ConsoleMessage.h" | 11 #include "core/inspector/ConsoleMessage.h" |
| 12 #include "core/page/Page.h" | 12 #include "core/page/Page.h" |
| 13 #include "core/workers/WorkerOrWorkletGlobalScope.h" | 13 #include "core/workers/WorkerOrWorkletGlobalScope.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 enum Milestone { | 17 enum Milestone { |
| 18 M56, | 18 M56, |
| 19 M57, | 19 M57, |
| 20 M58, | 20 M58, |
| 21 M59, | 21 M59, |
| 22 M60, | 22 M60, |
| 23 M61, | |
|
foolip
2017/04/20 09:53:50
If you rebase this should disappear, but if you're
Taylor_Brandstetter
2017/04/20 20:33:42
Acknowledged.
| |
| 24 M62, | |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 const char* milestoneString(Milestone milestone) { | 27 const char* milestoneString(Milestone milestone) { |
| 26 // These are the Estimated Stable Dates: | 28 // These are the Estimated Stable Dates: |
| 27 // https://www.chromium.org/developers/calendar | 29 // https://www.chromium.org/developers/calendar |
| 28 | 30 |
| 29 switch (milestone) { | 31 switch (milestone) { |
| 30 case M56: | 32 case M56: |
| 31 return "M56, around January 2017"; | 33 return "M56, around January 2017"; |
| 32 case M57: | 34 case M57: |
| 33 return "M57, around March 2017"; | 35 return "M57, around March 2017"; |
| 34 case M58: | 36 case M58: |
| 35 return "M58, around April 2017"; | 37 return "M58, around April 2017"; |
| 36 case M59: | 38 case M59: |
| 37 return "M59, around June 2017"; | 39 return "M59, around June 2017"; |
| 38 case M60: | 40 case M60: |
| 39 return "M60, around August 2017"; | 41 return "M60, around August 2017"; |
| 42 case M61: | |
| 43 return "M61, around September 2017"; | |
| 44 case M62: | |
| 45 return "M62, around October 2017"; | |
| 40 } | 46 } |
| 41 | 47 |
| 42 ASSERT_NOT_REACHED(); | 48 ASSERT_NOT_REACHED(); |
| 43 return nullptr; | 49 return nullptr; |
| 44 } | 50 } |
| 45 | 51 |
| 46 String replacedBy(const char* feature, const char* replacement) { | 52 String replacedBy(const char* feature, const char* replacement) { |
| 47 return String::format("%s is deprecated. Please use %s instead.", feature, | 53 return String::format("%s is deprecated. Please use %s instead.", feature, |
| 48 replacement); | 54 replacement); |
| 49 } | 55 } |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 "as of %s. See https://www.chromestatus.com/features/5030265697075200" | 415 "as of %s. See https://www.chromestatus.com/features/5030265697075200" |
| 410 " for more details.", | 416 " for more details.", |
| 411 milestoneString(M59)); | 417 milestoneString(M59)); |
| 412 | 418 |
| 413 case UseCounter::RtcpMuxPolicyNegotiate: | 419 case UseCounter::RtcpMuxPolicyNegotiate: |
| 414 return String::format( | 420 return String::format( |
| 415 "The rtcpMuxPolicy option is being considered for " | 421 "The rtcpMuxPolicy option is being considered for " |
| 416 "removal and may be removed no earlier than %s. If you depend on it, " | 422 "removal and may be removed no earlier than %s. If you depend on it, " |
| 417 "please see https://www.chromestatus.com/features/5654810086866944 " | 423 "please see https://www.chromestatus.com/features/5654810086866944 " |
| 418 "for more details.", | 424 "for more details.", |
| 419 milestoneString(M60)); | 425 milestoneString(M62)); |
| 420 | 426 |
| 421 case UseCounter::V8IDBFactory_WebkitGetDatabaseNames_Method: | 427 case UseCounter::V8IDBFactory_WebkitGetDatabaseNames_Method: |
| 422 return willBeRemoved("indexedDB.webkitGetDatabaseNames()", M60, | 428 return willBeRemoved("indexedDB.webkitGetDatabaseNames()", M60, |
| 423 "5725741740195840"); | 429 "5725741740195840"); |
| 424 | 430 |
| 425 case UseCounter::ChildSrcAllowedWorkerThatScriptSrcBlocked: | 431 case UseCounter::ChildSrcAllowedWorkerThatScriptSrcBlocked: |
| 426 return replacedWillBeRemoved("The 'child-src' directive", | 432 return replacedWillBeRemoved("The 'child-src' directive", |
| 427 "the 'script-src' directive for Workers", | 433 "the 'script-src' directive for Workers", |
| 428 M60, "5922594955984896"); | 434 M60, "5922594955984896"); |
| 429 | 435 |
| 430 // Features that aren't deprecated don't have a deprecation message. | 436 // Features that aren't deprecated don't have a deprecation message. |
| 431 default: | 437 default: |
| 432 return String(); | 438 return String(); |
| 433 } | 439 } |
| 434 } | 440 } |
| 435 | 441 |
| 436 } // namespace blink | 442 } // namespace blink |
| OLD | NEW |