diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 5 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_delegate.h | 7 | ||||
-rw-r--r-- | chrome_frame/test/automation_client_mock.cc | 17 | ||||
-rw-r--r-- | chrome_frame/test/proxy_factory_mock.cc | 5 |
4 files changed, 7 insertions, 27 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 1679758..880a645 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -195,10 +195,7 @@ ProxyFactory::ProxyCacheEntry::ProxyCacheEntry(const std::wstring& profile) thread->Start(); } -template <> struct RunnableMethodTraits<ProxyFactory> { - void RetainCallee(ProxyFactory* obj) {} - void ReleaseCallee(ProxyFactory* obj) {} -}; +DISABLE_RUNNABLE_METHOD_REFCOUNT(ProxyFactory); ProxyFactory::ProxyFactory() : uma_send_interval_(0) { diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h index 8ca11c7..0a98f84 100644 --- a/chrome_frame/chrome_frame_delegate.h +++ b/chrome_frame/chrome_frame_delegate.h @@ -54,11 +54,8 @@ class ChromeFrameDelegate { virtual ~ChromeFrameDelegate() {} }; -// Template specialization -template <> struct RunnableMethodTraits<ChromeFrameDelegate> { - void RetainCallee(ChromeFrameDelegate* obj) {} - void ReleaseCallee(ChromeFrameDelegate* obj) {} -}; +// Disable refcounting of ChromeFrameDelegate. +DISABLE_RUNNABLE_METHOD_REFCOUNT(ChromeFrameDelegate); extern UINT kAutomationServerReady; extern UINT kMessageFromChromeFrame; diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc index 048a0c3..d8a4cca 100644 --- a/chrome_frame/test/automation_client_mock.cc +++ b/chrome_frame/test/automation_client_mock.cc @@ -15,20 +15,9 @@ using testing::_; using testing::CreateFunctor; using testing::Return; -template <> struct RunnableMethodTraits<ProxyFactory::LaunchDelegate> { - void RetainCallee(ProxyFactory::LaunchDelegate* obj) {} - void ReleaseCallee(ProxyFactory::LaunchDelegate* obj) {} -}; - -template <> struct RunnableMethodTraits<ChromeFrameAutomationClient> { - void RetainCallee(ChromeFrameAutomationClient* obj) {} - void ReleaseCallee(ChromeFrameAutomationClient* obj) {} -}; - -template <> struct RunnableMethodTraits<chrome_frame_test::TimedMsgLoop> { - void RetainCallee(chrome_frame_test::TimedMsgLoop* obj) {} - void ReleaseCallee(chrome_frame_test::TimedMsgLoop* obj) {} -}; +DISABLE_RUNNABLE_METHOD_REFCOUNT(ProxyFactory::LaunchDelegate); +DISABLE_RUNNABLE_METHOD_REFCOUNT(ChromeFrameAutomationClient); +DISABLE_RUNNABLE_METHOD_REFCOUNT(chrome_frame_test::TimedMsgLoop); void MockProxyFactory::GetServerImpl(ChromeFrameAutomationProxy* pxy, void* proxy_id, diff --git a/chrome_frame/test/proxy_factory_mock.cc b/chrome_frame/test/proxy_factory_mock.cc index 2a587f4..8c3040e 100644 --- a/chrome_frame/test/proxy_factory_mock.cc +++ b/chrome_frame/test/proxy_factory_mock.cc @@ -10,10 +10,7 @@ using testing::CreateFunctor; using testing::_; -template <> struct RunnableMethodTraits<MockProxyFactory> { - void RetainCallee(MockProxyFactory* obj) {} - void ReleaseCallee(MockProxyFactory* obj) {} -}; +DISABLE_RUNNABLE_METHOD_REFCOUNT(MockProxyFactory); TEST(ProxyFactoryTest, CreateDestroy) { ProxyFactory f; |