summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:37:21 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-22 00:37:21 +0000
commit7a1c5ab3654723cfe4489e6981dcd67da1489f3f (patch)
treefca8c695a824dd834b95c29b5f618f6673066a5f /webkit/glue
parentf5eddaf87e378c29412a028e027f91d48fbab551 (diff)
downloadchromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.zip
chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.gz
chromium_src-7a1c5ab3654723cfe4489e6981dcd67da1489f3f.tar.bz2
Remove use of wide characters in stats table identifiers.
Review URL: http://codereview.chromium.org/11544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/chromium_bridge_impl.cc11
-rw-r--r--webkit/glue/plugins/plugin_lib.cc4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.cc4
-rw-r--r--webkit/glue/webframe_impl.cc7
4 files changed, 16 insertions, 10 deletions
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 515e2e8..9745a76 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -445,17 +445,22 @@ void ChromiumBridge::stopSharedTimer() {
// StatsCounters --------------------------------------------------------------
-void ChromiumBridge::decrementStatsCounter(const wchar_t* name) {
+void ChromiumBridge::decrementStatsCounter(const char* name) {
StatsCounter(name).Decrement();
}
-void ChromiumBridge::incrementStatsCounter(const wchar_t* name) {
+void ChromiumBridge::incrementStatsCounter(const char* name) {
StatsCounter(name).Increment();
}
#if USE(V8)
+// TODO(evanm): remove this conversion thunk once v8 supports plain char*
+// counter functions.
+static int* CounterFunction(const wchar_t* name) {
+ return StatsTable::FindLocation(WideToASCII(name).c_str());
+}
void ChromiumBridge::initV8CounterFunction() {
- v8::V8::SetCounterFunction(StatsTable::FindLocation);
+ v8::V8::SetCounterFunction(CounterFunction);
}
#endif
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc
index c79d2cf..96296dc 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/glue/plugins/plugin_lib.cc
@@ -29,8 +29,8 @@
namespace NPAPI
{
-const wchar_t kPluginLibrariesLoadedCounter[] = L"PluginLibrariesLoaded";
-const wchar_t kPluginInstancesActiveCounter[] = L"PluginInstancesActive";
+const char kPluginLibrariesLoadedCounter[] = "PluginLibrariesLoaded";
+const char kPluginInstancesActiveCounter[] = "PluginInstancesActive";
PluginLib::PluginMap* PluginLib::loaded_libs_;
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/glue/plugins/webplugin_delegate_impl.cc
index fd31ab7..9282de7 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl.cc
@@ -22,7 +22,7 @@
#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webkit_glue.h"
-static StatsCounter windowless_queue(L"Plugin.ThrottleQueue");
+static StatsCounter windowless_queue("Plugin.ThrottleQueue");
static const wchar_t kNativeWindowClassName[] = L"NativeWindowClass";
static const wchar_t kWebPluginDelegateProperty[] =
@@ -885,7 +885,7 @@ void WebPluginDelegateImpl::WindowlessPaint(HDC hdc,
// NOTE: NPAPI is not 64bit safe. It puts pointers into 32bit values.
paint_event.wParam = PtrToUlong(hdc);
paint_event.lParam = PtrToUlong(&damage_rect_win);
- static StatsRate plugin_paint(L"Plugin.Paint");
+ static StatsRate plugin_paint("Plugin.Paint");
StatsScope<StatsRate> scope(plugin_paint);
instance()->NPP_HandleEvent(&paint_event);
}
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 4ee45f9..a5a8fda 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -183,7 +183,8 @@ using WebCore::XPathResult;
// once we figure out how to make tickmark support work again!
static const size_t kNoTickmark = size_t(-1);
-static const wchar_t* const kWebFrameActiveCount = L"WebFrameActiveCount";
+// Key for a StatsCounter tracking how many WebFrames are active.
+static const char* const kWebFrameActiveCount = "WebFrameActiveCount";
static const char* const kOSDType = "application/opensearchdescription+xml";
static const char* const kOSDRel = "search";
@@ -487,7 +488,7 @@ bool WebFrameImpl::GetPreviousState(GURL* url, std::wstring* title,
if (!item)
return false;
- static StatsCounterTimer history_timer(L"GetHistoryTimer");
+ static StatsCounterTimer history_timer("GetHistoryTimer");
StatsScope<StatsCounterTimer> history_scope(history_timer);
webkit_glue::HistoryItemToString(item, history_state);
@@ -1474,7 +1475,7 @@ void WebFrameImpl::Layout() {
}
void WebFrameImpl::Paint(gfx::PlatformCanvas* canvas, const gfx::Rect& rect) {
- static StatsRate rendering(L"WebFramePaintTime");
+ static StatsRate rendering("WebFramePaintTime");
StatsScope<StatsRate> rendering_scope(rendering);
if (!rect.IsEmpty()) {