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

Unified Diff: media/audio/audio_output_proxy.cc

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address comments from Avi Created 9 years 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: media/audio/audio_output_proxy.cc
===================================================================
--- media/audio/audio_output_proxy.cc (revision 113173)
+++ media/audio/audio_output_proxy.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -84,9 +84,14 @@
DCHECK(state_ == kCreated || state_ == kError || state_ == kOpened);
DCHECK(!physical_stream_);
- if (state_ != kCreated) {
+ if (state_ != kCreated)
dispatcher_->StreamClosed();
- }
- dispatcher_->message_loop()->DeleteSoon(FROM_HERE, this);
+
state_ = kClosed;
+
+ // Delete the object now like is done in the Close() implementation of
henrika (OOO until Aug 14) 2011/12/07 10:08:34 Have to trust you on this part. Don't know the det
tommi (sloooow) - chröme 2011/12/07 12:26:44 The Mac, Wave and WASAPI implementations delete th
+ // physical stream objects. If we delete the object via DeleteSoon, we
+ // unnecessarily complicate the Shutdown procedure of the
+ // dispatcher+audio manager.
+ delete this;
}

Powered by Google App Engine
This is Rietveld 408576698