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

Unified Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 1750503002: Move Deprecation helpers into an anonymous namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698