Index: content/public/test/test_browser_thread.cc |
diff --git a/content/public/test/test_browser_thread.cc b/content/public/test/test_browser_thread.cc |
index 7092c6cc44dbeb592121196be19f9d695eedf6c3..ae83f78f78aad1455f8a9f98aa6c4f003ef4499b 100644 |
--- a/content/public/test/test_browser_thread.cc |
+++ b/content/public/test/test_browser_thread.cc |
@@ -15,30 +15,26 @@ namespace content { |
class TestBrowserThreadImpl : public BrowserThreadImpl { |
public: |
explicit TestBrowserThreadImpl(BrowserThread::ID identifier) |
- : BrowserThreadImpl(identifier), |
- notification_service_(NULL) { |
- } |
+ : BrowserThreadImpl(identifier) {} |
TestBrowserThreadImpl(BrowserThread::ID identifier, |
base::MessageLoop* message_loop) |
- : BrowserThreadImpl(identifier, message_loop), |
- notification_service_(NULL) {} |
+ : BrowserThreadImpl(identifier, message_loop) {} |
~TestBrowserThreadImpl() override { Stop(); } |
void Init() override { |
- notification_service_ = new NotificationServiceImpl; |
+ notification_service_.reset(new NotificationServiceImpl); |
BrowserThreadImpl::Init(); |
} |
void CleanUp() override { |
- delete notification_service_; |
- notification_service_ = NULL; |
+ notification_service_.reset(); |
BrowserThreadImpl::CleanUp(); |
} |
private: |
- NotificationService* notification_service_; |
+ std::unique_ptr<NotificationService> notification_service_; |
DISALLOW_COPY_AND_ASSIGN(TestBrowserThreadImpl); |
}; |
@@ -77,8 +73,4 @@ bool TestBrowserThread::IsRunning() { |
return impl_->IsRunning(); |
} |
-base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { |
- return impl_.get(); |
-} |
- |
} // namespace content |