Index: content/renderer/renderer_webkitplatformsupport_impl.cc |
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc |
index e83287251df0a535f171f53070d58cd659a569b8..ed933773013103968521c8ef6f9da4fcd945392a 100644 |
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc |
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc |
@@ -173,6 +173,27 @@ RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { |
//------------------------------------------------------------------------------ |
+namespace { |
+ |
+bool SendSyncMessageFromAnyThreadInternal(IPC::SyncMessage* msg) { |
+ RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
+ if (render_thread) |
+ return render_thread->Send(msg); |
+ scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter( |
+ ChildThread::current()->sync_message_filter()); |
+ return sync_msg_filter->Send(msg); |
+} |
+ |
+bool SendSyncMessageFromAnyThread(IPC::SyncMessage* msg) { |
+ base::TimeTicks begin = base::TimeTicks::Now(); |
+ const bool success = SendSyncMessageFromAnyThread(msg); |
+ base::TimeDelta delta = base::TimeTicks::Now() - begin; |
+ ChildThread::current()->Send(new ViewHostMsg_SyncIPCElapsedTime(delta)); |
jam
2012/05/31 15:20:16
you can histogram from the renderer, just call HIS
kinuko
2012/05/31 17:10:36
oooops... (ashamed) done.
|
+ return success; |
+} |
+ |
+} // namespace |
+ |
WebKit::WebClipboard* RendererWebKitPlatformSupportImpl::clipboard() { |
return clipboard_.get(); |
} |
@@ -215,17 +236,6 @@ bool RendererWebKitPlatformSupportImpl::sandboxEnabled() { |
return !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); |
} |
-bool RendererWebKitPlatformSupportImpl::SendSyncMessageFromAnyThread( |
- IPC::SyncMessage* msg) { |
- RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
- if (render_thread) |
- return render_thread->Send(msg); |
- |
- scoped_refptr<IPC::SyncMessageFilter> sync_msg_filter( |
- ChildThread::current()->sync_message_filter()); |
- return sync_msg_filter->Send(msg); |
-} |
- |
unsigned long long RendererWebKitPlatformSupportImpl::visitedLinkHash( |
const char* canonical_url, |
size_t length) { |