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

Side by Side Diff: media/audio/audio_output_controller.cc

Issue 16297002: Update media/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/audio/audio_output_controller.h" 5 #include "media/audio/audio_output_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 volume_(1.0), 48 volume_(1.0),
49 state_(kEmpty), 49 state_(kEmpty),
50 num_allowed_io_(0), 50 num_allowed_io_(0),
51 sync_reader_(sync_reader), 51 sync_reader_(sync_reader),
52 message_loop_(audio_manager->GetMessageLoop()), 52 message_loop_(audio_manager->GetMessageLoop()),
53 number_polling_attempts_left_(0), 53 number_polling_attempts_left_(0),
54 weak_this_(this) { 54 weak_this_(this) {
55 DCHECK(audio_manager); 55 DCHECK(audio_manager);
56 DCHECK(handler_); 56 DCHECK(handler_);
57 DCHECK(sync_reader_); 57 DCHECK(sync_reader_);
58 DCHECK(message_loop_); 58 DCHECK(message_loop_.get());
59 } 59 }
60 60
61 AudioOutputController::~AudioOutputController() { 61 AudioOutputController::~AudioOutputController() {
62 DCHECK_EQ(kClosed, state_); 62 DCHECK_EQ(kClosed, state_);
63 } 63 }
64 64
65 // static 65 // static
66 scoped_refptr<AudioOutputController> AudioOutputController::Create( 66 scoped_refptr<AudioOutputController> AudioOutputController::Create(
67 AudioManager* audio_manager, 67 AudioManager* audio_manager,
68 EventHandler* event_handler, 68 EventHandler* event_handler,
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 DCHECK(base::AtomicRefCountIsZero(&num_allowed_io_)); 437 DCHECK(base::AtomicRefCountIsZero(&num_allowed_io_));
438 base::AtomicRefCountInc(&num_allowed_io_); 438 base::AtomicRefCountInc(&num_allowed_io_);
439 } 439 }
440 440
441 void AudioOutputController::DisallowEntryToOnMoreIOData() { 441 void AudioOutputController::DisallowEntryToOnMoreIOData() {
442 const bool is_zero = !base::AtomicRefCountDec(&num_allowed_io_); 442 const bool is_zero = !base::AtomicRefCountDec(&num_allowed_io_);
443 DCHECK(is_zero); 443 DCHECK(is_zero);
444 } 444 }
445 445
446 } // namespace media 446 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/audio_output_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698