summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/Logging.cpp
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
committerFeng Qian <fqian@google.com>2009-06-18 18:20:56 -0700
commit1edef79f87f9c52c21d69c87c19f8e2b140a9119 (patch)
treecad337ef493b0d9710bf3ae478cb87cb534f598d /WebCore/platform/Logging.cpp
parentb83fc086000e27bc227580bd0e35b9d7bee1179a (diff)
parentc9c4d65c1547996ed3748026904d6e7f09aec2b4 (diff)
downloadexternal_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.zip
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.gz
external_webkit-1edef79f87f9c52c21d69c87c19f8e2b140a9119.tar.bz2
Merge commit 'goog/master-webkit-merge' into webkit-merge-44544
Diffstat (limited to 'WebCore/platform/Logging.cpp')
-rw-r--r--WebCore/platform/Logging.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/WebCore/platform/Logging.cpp b/WebCore/platform/Logging.cpp
index a1aa3d6..9c3f324 100644
--- a/WebCore/platform/Logging.cpp
+++ b/WebCore/platform/Logging.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "Logging.h"
+#include "PlatformString.h"
namespace WebCore {
@@ -59,4 +60,33 @@ WTFLogChannel LogMedia = { 0x01000000, "WebCoreLogLevel", WTFLogChan
WTFLogChannel LogPlugin = { 0x02000000, "WebCoreLogLevel", WTFLogChannelOff };
WTFLogChannel LogArchives = { 0x04000000, "WebCoreLogLevel", WTFLogChannelOff };
+WTFLogChannel* getChannelFromName(const String& channelName)
+{
+ if (!(channelName.length() >= 2))
+ return 0;
+
+ if (channelName == String("BackForward")) return &LogBackForward;
+ if (channelName == String("Editing")) return &LogEditing;
+ if (channelName == String("Events")) return &LogEvents;
+ if (channelName == String("Frames")) return &LogFrames;
+ if (channelName == String("FTP")) return &LogFTP;
+ if (channelName == String("History")) return &LogHistory;
+ if (channelName == String("IconDatabase")) return &LogIconDatabase;
+ if (channelName == String("Loading")) return &LogLoading;
+ if (channelName == String("Media")) return &LogMedia;
+ if (channelName == String("Network")) return &LogNetwork;
+ if (channelName == String("NotYetImplemented")) return &LogNotYetImplemented;
+ if (channelName == String("PageCache")) return &LogPageCache;
+ if (channelName == String("PlatformLeaks")) return &LogPlatformLeaks;
+ if (channelName == String("Plugin")) return &LogPlugin;
+ if (channelName == String("PopupBlocking")) return &LogPopupBlocking;
+ if (channelName == String("SpellingAndGrammar")) return &LogSpellingAndGrammar;
+ if (channelName == String("SQLDatabase")) return &LogSQLDatabase;
+ if (channelName == String("StorageAPI")) return &LogStorageAPI;
+ if (channelName == String("TextConversion")) return &LogTextConversion;
+ if (channelName == String("Threading")) return &LogThreading;
+
+ return 0;
+}
+
}