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

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: Set svn eol properties for a couple of files 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
« no previous file with comments | « media/audio/audio_output_proxy.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_proxy.cc
===================================================================
--- media/audio/audio_output_proxy.cc (revision 114012)
+++ 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
+ // physical stream objects. If we delete the object via DeleteSoon, we
+ // unnecessarily complicate the Shutdown procedure of the
+ // dispatcher+audio manager.
+ delete this;
}
Property changes on: media\audio\audio_output_proxy.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « media/audio/audio_output_proxy.h ('k') | media/audio/audio_output_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698