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

Unified Diff: chrome/browser/renderer_host/audio_renderer_host.cc

Issue 342090: Use ChromeThread::DeleteOnIOThread in a few places where an object must be de... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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: chrome/browser/renderer_host/audio_renderer_host.cc
===================================================================
--- chrome/browser/renderer_host/audio_renderer_host.cc (revision 30863)
+++ chrome/browser/renderer_host/audio_renderer_host.cc (working copy)
@@ -25,7 +25,6 @@
#include "base/process.h"
#include "base/shared_memory.h"
#include "base/waitable_event.h"
-#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/audio_renderer_host.h"
#include "chrome/common/render_messages.h"
#include "ipc/ipc_logging.h"
@@ -335,14 +334,13 @@
: process_id_(0),
process_handle_(0),
ipc_sender_(NULL) {
- // Make sure we perform actual initialization operations in the thread where
- // this object should live.
- ChromeThread::PostTask(
- ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(this, &AudioRendererHost::OnInitialized));
+ // Increase the ref count of this object so it is active until we do
+ // Release().
+ AddRef();
}
AudioRendererHost::~AudioRendererHost() {
+ DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
DCHECK(sources_.empty());
}
@@ -498,13 +496,6 @@
}
}
-void AudioRendererHost::OnInitialized() {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
- // Increase the ref count of this object so it is active until we do
- // Release().
- AddRef();
-}
-
void AudioRendererHost::OnDestroyed() {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
ipc_sender_ = NULL;
« no previous file with comments | « chrome/browser/renderer_host/audio_renderer_host.h ('k') | chrome/browser/renderer_host/buffered_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698