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

Unified Diff: content/browser/browser_process_sub_thread.cc

Issue 10993056: Just because we want to destroy a pointer somewhere other than a destructor doesn't mean we can't u… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
Index: content/browser/browser_process_sub_thread.cc
===================================================================
--- content/browser/browser_process_sub_thread.cc (revision 158860)
+++ content/browser/browser_process_sub_thread.cc (working copy)
@@ -19,8 +19,7 @@
namespace content {
BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier)
- : BrowserThreadImpl(identifier),
- notification_service_(NULL) {
+ : BrowserThreadImpl(identifier) {
}
BrowserProcessSubThread::~BrowserProcessSubThread() {
@@ -33,7 +32,7 @@
CoInitialize(NULL);
#endif
- notification_service_ = new NotificationServiceImpl;
+ notification_service_.reset(new NotificationServiceImpl());
BrowserThreadImpl::Init();
@@ -52,8 +51,7 @@
BrowserThreadImpl::CleanUp();
- delete notification_service_;
- notification_service_ = NULL;
+ notification_service_.reset();
#if defined(OS_WIN)
// Closes the COM library on the current thread. CoInitialize must
« no previous file with comments | « content/browser/browser_process_sub_thread.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698