Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: content/public/test/test_browser_thread.cc

Issue 2130253002: Remove TestBrowserThread::DeprecatedGetThreadObject(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/test_browser_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/public/test/test_browser_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698