Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (114514 => 114515)
--- trunk/Source/WebCore/CMakeLists.txt 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-04-18 16:29:20 UTC (rev 114515)
@@ -1115,6 +1115,7 @@
platform/SharedBuffer.cpp
platform/SharedBufferChunkReader.cpp
platform/SchemeRegistry.cpp
+ platform/StatsCounter.cpp
platform/ThreadGlobalData.cpp
platform/ThreadTimers.cpp
platform/Timer.cpp
Modified: trunk/Source/WebCore/ChangeLog (114514 => 114515)
--- trunk/Source/WebCore/ChangeLog 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/ChangeLog 2012-04-18 16:29:20 UTC (rev 114515)
@@ -1,3 +1,48 @@
+2012-04-18 Mark Pilgrim <[email protected]>
+
+ Followup to "Call incrementStatsCounter directly"
+ https://bugs.webkit.org/show_bug.cgi?id=83109
+
+ Reviewed by Kentaro Hara.
+
+ Now that incrementStatsCounter has been moved from
+ PlatformSupport.h to Platform.h, we need to be able to call it directly
+ from WebCore/bindings/v8/v8Proxy.h (for the INC_STATS macro). That
+ means we need a new StatsCounter class in WebCore/platform/ and an
+ implementation in
+ WebCore/platform/chromium/StatsCounterChromium.cpp. Other ports
+ are welcome to implement their own stats counters if they
+ wish. This pattern was based on the
+ HistogramSupport/HistogramSupportChromium classes.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/v8/V8Proxy.h:
+ * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
+ (WebCore::V8DedicatedWorkerContext::postMessageCallback):
+ (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback):
+ * bindings/v8/custom/V8NotificationCenterCustom.cpp:
+ (WebCore::V8NotificationCenter::createHTMLNotificationCallback):
+ (WebCore::V8NotificationCenter::createNotificationCallback):
+ (WebCore::V8NotificationCenter::requestPermissionCallback):
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+ (WebCore::V8WorkerContext::importScriptsCallback):
+ (WebCore::V8WorkerContext::setTimeoutCallback):
+ (WebCore::V8WorkerContext::setIntervalCallback):
+ * platform/StatsCounter.cpp: Added.
+ (WebCore):
+ (WebCore::StatsCounter::incrementStatsCounter):
+ * platform/StatsCounter.h: Added.
+ (WebCore):
+ (StatsCounter):
+ * platform/chromium/StatsCounterChromium.cpp: Added.
+ (WebCore):
+ (WebCore::StatsCounter::incrementStatsCounter):
+
2012-04-18 Alexander Pavlov <[email protected]>
[Chromium] REGRESSION: Popup shrinks because of autocomplete
Modified: trunk/Source/WebCore/GNUmakefile.list.am (114514 => 114515)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-04-18 16:29:20 UTC (rev 114515)
@@ -3561,6 +3561,7 @@
Source/WebCore/platform/sql/SQLValue.cpp \
Source/WebCore/platform/sql/SQLValue.h \
Source/WebCore/platform/SSLKeyGenerator.h \
+ Source/WebCore/platform/StatsCounter.h \
Source/WebCore/platform/SuddenTermination.h \
Source/WebCore/platform/Supplementable.h \
Source/WebCore/platform/SystemTime.h \
Modified: trunk/Source/WebCore/Target.pri (114514 => 114515)
--- trunk/Source/WebCore/Target.pri 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/Target.pri 2012-04-18 16:29:20 UTC (rev 114515)
@@ -1179,6 +1179,7 @@
platform/ScrollView.cpp \
platform/SharedBuffer.cpp \
platform/SharedBufferChunkReader.cpp \
+ platform/StatsCounter.cpp \
platform/sql/SQLiteAuthorizer.cpp \
platform/sql/SQLiteDatabase.cpp \
platform/sql/SQLiteFileSystem.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (114514 => 114515)
--- trunk/Source/WebCore/WebCore.gypi 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/WebCore.gypi 2012-04-18 16:29:20 UTC (rev 114515)
@@ -314,6 +314,7 @@
'platform/SearchPopupMenu.h',
'platform/SharedBuffer.h',
'platform/SharedBufferChunkReader.h',
+ 'platform/StatsCounter.h',
'platform/Supplementable.h',
'platform/SystemTime.h',
'platform/Theme.h',
@@ -3316,6 +3317,7 @@
'platform/chromium/SharedTimerChromium.cpp',
'platform/chromium/SoundChromiumPosix.cpp',
'platform/chromium/SoundChromiumWin.cpp',
+ 'platform/chromium/StatsCounterChromium.cpp',
'platform/chromium/SuddenTerminationChromium.cpp',
'platform/chromium/SystemTimeChromium.cpp',
'platform/chromium/TemporaryLinkStubs.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (114514 => 114515)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-18 16:29:20 UTC (rev 114515)
@@ -27798,6 +27798,14 @@
>
</File>
<File
+ RelativePath="..\platform\StatsCounter.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\platform\StatsCounter.h"
+ >
+ </File>
+ <File
RelativePath="..\platform\SuddenTermination.h"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (114514 => 114515)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-04-18 16:29:20 UTC (rev 114515)
@@ -5805,11 +5805,13 @@
D619A307144E00BE004BC302 /* ChildListMutationScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */; };
D619A308144E00BE004BC302 /* ChildListMutationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = D619A306144E00BE004BC302 /* ChildListMutationScope.h */; };
D630E2AC149BF344005B2F93 /* HistogramSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F93 /* HistogramSupport.h */; };
+ D630E2AC149BF344005B2F94 /* StatsCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F94 /* StatsCounter.h */; };
D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */; };
D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E276AE14637455001D280A /* MutationObserverRegistration.h */; };
D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E528A1149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp */; };
D6E528A4149A926D00EFE1F3 /* MutationObserverInterestGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E528A2149A926D00EFE1F3 /* MutationObserverInterestGroup.h */; };
D6FDAEF3149C06190037B1E1 /* HistogramSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */; };
+ D6FDAEF3149C06190037B1E2 /* StatsCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E2 /* StatsCounter.cpp */; };
D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderRegion.cpp */; };
D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderRegion.h */; };
D72F6D79153159A3001EE44E /* FlowThreadController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D72F6D77153159A3001EE44E /* FlowThreadController.cpp */; };
@@ -12931,11 +12933,13 @@
D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildListMutationScope.cpp; sourceTree = "<group>"; };
D619A306144E00BE004BC302 /* ChildListMutationScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildListMutationScope.h; sourceTree = "<group>"; };
D630E2AB149BF344005B2F93 /* HistogramSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistogramSupport.h; sourceTree = "<group>"; };
+ D630E2AB149BF344005B2F94 /* StatsCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StatsCounter.h; sourceTree = "<group>"; };
D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserverRegistration.cpp; sourceTree = "<group>"; };
D6E276AE14637455001D280A /* MutationObserverRegistration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserverRegistration.h; sourceTree = "<group>"; };
D6E528A1149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserverInterestGroup.cpp; sourceTree = "<group>"; };
D6E528A2149A926D00EFE1F3 /* MutationObserverInterestGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserverInterestGroup.h; sourceTree = "<group>"; };
D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistogramSupport.cpp; sourceTree = "<group>"; };
+ D6FDAEF2149C06190037B1E2 /* StatsCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StatsCounter.cpp; sourceTree = "<group>"; };
D70AD65513E1342B005B50B4 /* RenderRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegion.cpp; sourceTree = "<group>"; };
D70AD65613E1342B005B50B4 /* RenderRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegion.h; sourceTree = "<group>"; };
D72F6D77153159A3001EE44E /* FlowThreadController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlowThreadController.cpp; sourceTree = "<group>"; };
@@ -20302,6 +20306,8 @@
93309EA0099EB78C0056E581 /* SharedTimer.h */,
4B3043C60AE0370300A82647 /* Sound.h */,
F587866202DE3B1101EA4122 /* SSLKeyGenerator.h */,
+ D6FDAEF2149C06190037B1E2 /* StatsCounter.cpp */,
+ D630E2AB149BF344005B2F94 /* StatsCounter.h */,
93B2D8150F9920D2006AE6B2 /* SuddenTermination.h */,
97627B9714FB5424002CDCA1 /* Supplementable.h */,
93E62D990985F41600E1B5E3 /* SystemTime.h */,
@@ -24212,6 +24218,7 @@
93F1996308245E59001E9ABC /* SSLKeyGenerator.h in Headers */,
CEA3949D11D45CDA003094CF /* StaticHashSetNodeList.h in Headers */,
BC7FA62D0D1F0EFF00DB22A9 /* StaticNodeList.h in Headers */,
+ D630E2AC149BF344005B2F94 /* StatsCounter.h in Headers */,
A5AFB350115151A700B045CB /* StepRange.h in Headers */,
51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */,
C5160EEB1004543A00A7CEE2 /* StorageAreaImpl.h in Headers */,
@@ -27336,6 +27343,7 @@
93F19AE608245E59001E9ABC /* SSLKeyGeneratorMac.cpp in Sources */,
CEA3949C11D45CDA003094CF /* StaticHashSetNodeList.cpp in Sources */,
BC7FA62E0D1F0EFF00DB22A9 /* StaticNodeList.cpp in Sources */,
+ D6FDAEF3149C06190037B1E2 /* StatsCounter.cpp in Sources */,
A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */,
51E3F9C70DA059DC00250911 /* Storage.cpp in Sources */,
C5160EEA1004543A00A7CEE2 /* StorageAreaImpl.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.h (114514 => 114515)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.h 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.h 2012-04-18 16:29:20 UTC (rev 114515)
@@ -33,6 +33,7 @@
#include "PlatformSupport.h"
#include "SharedPersistent.h"
+#include "StatsCounter.h"
#include "V8AbstractEventListener.h"
#include "V8DOMWindowShell.h"
#include "V8DOMWrapper.h"
@@ -46,7 +47,7 @@
#include <wtf/text/TextPosition.h>
#if defined(ENABLE_DOM_STATS_COUNTERS) && PLATFORM(CHROMIUM)
-#define INC_STATS(name) webkitPlatformSupport()->incrementStatsCounter(name)
+#define INC_STATS(name) StatsCounter::incrementStatsCounter(name)
#else
#define INC_STATS(name)
#endif
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp (114514 => 114515)
--- trunk/Source/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp 2012-04-18 16:29:20 UTC (rev 114515)
@@ -67,13 +67,13 @@
v8::Handle<v8::Value> V8DedicatedWorkerContext::postMessageCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.DedicatedWorkerContext.postMessage");
+ INC_STATS("DOM.DedicatedWorkerContext.postMessage");
return handlePostMessageCallback(args, false);
}
v8::Handle<v8::Value> V8DedicatedWorkerContext::webkitPostMessageCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.DedicatedWorkerContext.postMessage");
+ INC_STATS("DOM.DedicatedWorkerContext.postMessage");
return handlePostMessageCallback(args, true);
}
Modified: trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp (114514 => 114515)
--- trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/bindings/v8/custom/V8NotificationCenterCustom.cpp 2012-04-18 16:29:20 UTC (rev 114515)
@@ -49,7 +49,7 @@
v8::Handle<v8::Value> V8NotificationCenter::createHTMLNotificationCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.NotificationCenter.CreateHTMLNotification()");
+ INC_STATS("DOM.NotificationCenter.CreateHTMLNotification()");
NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ExceptionCode ec = 0;
@@ -65,7 +65,7 @@
v8::Handle<v8::Value> V8NotificationCenter::createNotificationCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.NotificationCenter.CreateNotification()");
+ INC_STATS("DOM.NotificationCenter.CreateNotification()");
NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ExceptionCode ec = 0;
@@ -80,7 +80,7 @@
v8::Handle<v8::Value> V8NotificationCenter::requestPermissionCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.NotificationCenter.RequestPermission()");
+ INC_STATS("DOM.NotificationCenter.RequestPermission()");
NotificationCenter* notificationCenter = V8NotificationCenter::toNative(args.Holder());
ScriptExecutionContext* context = notificationCenter->scriptExecutionContext();
Modified: trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp (114514 => 114515)
--- trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp 2012-04-18 16:28:12 UTC (rev 114514)
+++ trunk/Source/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp 2012-04-18 16:29:20 UTC (rev 114515)
@@ -88,7 +88,7 @@
v8::Handle<v8::Value> V8WorkerContext::importScriptsCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.WorkerContext.importScripts()");
+ INC_STATS("DOM.WorkerContext.importScripts()");
if (!args.Length())
return v8::Undefined();
@@ -114,13 +114,13 @@
v8::Handle<v8::Value> V8WorkerContext::setTimeoutCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.WorkerContext.setTimeout()");
+ INC_STATS("DOM.WorkerContext.setTimeout()");
return SetTimeoutOrInterval(args, true);
}
v8::Handle<v8::Value> V8WorkerContext::setIntervalCallback(const v8::Arguments& args)
{
- INC_STATS(L"DOM.WorkerContext.setInterval()");
+ INC_STATS("DOM.WorkerContext.setInterval()");
return SetTimeoutOrInterval(args, false);
}
Added: trunk/Source/WebCore/platform/StatsCounter.cpp (0 => 114515)
--- trunk/Source/WebCore/platform/StatsCounter.cpp (rev 0)
+++ trunk/Source/WebCore/platform/StatsCounter.cpp 2012-04-18 16:29:20 UTC (rev 114515)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StatsCounter.h"
+
+namespace WebCore {
+
+void StatsCounter::incrementStatsCounter(const char*)
+{
+}
+
+} // namespace WebCore
Added: trunk/Source/WebCore/platform/StatsCounter.h (0 => 114515)
--- trunk/Source/WebCore/platform/StatsCounter.h (rev 0)
+++ trunk/Source/WebCore/platform/StatsCounter.h 2012-04-18 16:29:20 UTC (rev 114515)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StatsCounter_h
+#define StatsCounter_h
+
+namespace WebCore {
+
+class StatsCounter {
+public:
+ static void incrementStatsCounter(const char*);
+};
+
+} // namespace WebCore
+
+#endif // StatsCounter_h
Added: trunk/Source/WebCore/platform/chromium/StatsCounterChromium.cpp (0 => 114515)
--- trunk/Source/WebCore/platform/chromium/StatsCounterChromium.cpp (rev 0)
+++ trunk/Source/WebCore/platform/chromium/StatsCounterChromium.cpp 2012-04-18 16:29:20 UTC (rev 114515)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StatsCounter.h"
+
+#include <public/Platform.h>
+
+namespace WebCore {
+
+void StatsCounter::incrementStatsCounter(const char* counterName)
+{
+ WebKit::Platform::current()->incrementStatsCounter(counterName);
+}
+
+} // namespace WebCore