Index: third_party/WebKit/Source/core/frame/Deprecation.cpp |
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp |
index a3ad08754356dde3ce23a9cb2f9e03201cb1461e..54377030d45d1661aefd892081bf492cec36e8b6 100644 |
--- a/third_party/WebKit/Source/core/frame/Deprecation.cpp |
+++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp |
@@ -12,6 +12,47 @@ |
#include "core/inspector/ConsoleMessage.h" |
#include "core/workers/WorkerGlobalScope.h" |
+namespace { |
+ |
+const char* milestoneString(int milestone) |
+{ |
+ // These are the Estimated Stable Dates: |
+ // https://www.chromium.org/developers/calendar |
+ |
+ switch (milestone) { |
+ case 50: |
+ return "M50, around April 2016"; |
+ case 51: |
+ return "M51, around May 2016"; |
+ case 52: |
+ return "M52, around July 2016"; |
+ case 53: |
+ return "M53, around September 2016"; |
+ case 54: |
+ return "M54, around October 2016"; |
+ } |
+ |
+ ASSERT_NOT_REACHED(); |
+ return nullptr; |
+} |
+ |
+String replacedBy(const char* feature, const char* replacement) |
+{ |
+ return String::format("%s is deprecated. Please use %s instead.", feature, replacement); |
+} |
+ |
+String willBeRemoved(const char* feature, int milestone, const char* details) |
+{ |
+ return String::format("%s is deprecated and will be removed in %s. See https://www.chromestatus.com/features/%s for more details.", feature, milestoneString(milestone), details); |
+} |
+ |
+String replacedWillBeRemoved(const char* feature, const char* replacement, int milestone, const char* details) |
+{ |
+ return String::format("%s is deprecated and will be removed in %s. Please use %s instead. See https://www.chromestatus.com/features/%s for more details.", feature, milestoneString(milestone), replacement, details); |
+} |
+ |
+} // anonymous namespace |
+ |
namespace blink { |
Deprecation::Deprecation() |
@@ -103,43 +144,6 @@ void Deprecation::countDeprecationIfNotPrivateScript(v8::Isolate* isolate, Execu |
Deprecation::countDeprecation(context, feature); |
} |
-static const char* milestoneString(int milestone) |
-{ |
- // These are the Estimated Stable Dates: |
- // https://www.chromium.org/developers/calendar |
- |
- switch (milestone) { |
- case 50: |
- return "M50, around April 2016"; |
- case 51: |
- return "M51, around May 2016"; |
- case 52: |
- return "M52, around July 2016"; |
- case 53: |
- return "M53, around September 2016"; |
- case 54: |
- return "M54, around October 2016"; |
- } |
- |
- ASSERT_NOT_REACHED(); |
- return nullptr; |
-} |
- |
-static String replacedBy(const char* feature, const char* replacement) |
-{ |
- return String::format("%s is deprecated. Please use %s instead.", feature, replacement); |
-} |
- |
-String Deprecation::willBeRemoved(const char* feature, int milestone, const char* details) |
-{ |
- return String::format("%s is deprecated and will be removed in %s. See https://www.chromestatus.com/features/%s for more details.", feature, milestoneString(milestone), details); |
-} |
- |
-static String replacedWillBeRemoved(const char* feature, const char* replacement, int milestone, const char* details) |
-{ |
- return String::format("%s is deprecated and will be removed in %s. Please use %s instead. See https://www.chromestatus.com/features/%s for more details.", feature, milestoneString(milestone), replacement, details); |
-} |
- |
String Deprecation::deprecationMessage(UseCounter::Feature feature) |
{ |
switch (feature) { |