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

Side by Side Diff: media/filters/decrypting_audio_decoder_unittest.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/filters/decrypting_audio_decoder.cc ('k') | media/filters/decrypting_demuxer_stream.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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 0, 43 0,
44 std::vector<SubsampleEntry>()))); 44 std::vector<SubsampleEntry>())));
45 return buffer; 45 return buffer;
46 } 46 }
47 47
48 // Use anonymous namespace here to prevent the actions to be defined multiple 48 // Use anonymous namespace here to prevent the actions to be defined multiple
49 // times across multiple test files. Sadly we can't use static for them. 49 // times across multiple test files. Sadly we can't use static for them.
50 namespace { 50 namespace {
51 51
52 ACTION_P(ReturnBuffer, buffer) { 52 ACTION_P(ReturnBuffer, buffer) {
53 arg0.Run(buffer ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer); 53 arg0.Run(buffer.get() ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer);
54 } 54 }
55 55
56 ACTION_P(RunCallbackIfNotNull, param) { 56 ACTION_P(RunCallbackIfNotNull, param) {
57 if (!arg0.is_null()) 57 if (!arg0.is_null())
58 arg0.Run(param); 58 arg0.Run(param);
59 } 59 }
60 60
61 ACTION_P2(ResetAndRunCallback, callback, param) { 61 ACTION_P2(ResetAndRunCallback, callback, param) {
62 base::ResetAndReturn(callback).Run(param); 62 base::ResetAndReturn(callback).Run(param);
63 } 63 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 // Test resetting after the decoder has been reset. 579 // Test resetting after the decoder has been reset.
580 TEST_F(DecryptingAudioDecoderTest, Reset_AfterReset) { 580 TEST_F(DecryptingAudioDecoderTest, Reset_AfterReset) {
581 Initialize(); 581 Initialize();
582 EnterNormalDecodingState(); 582 EnterNormalDecodingState();
583 Reset(); 583 Reset();
584 Reset(); 584 Reset();
585 } 585 }
586 586
587 } // namespace media 587 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decrypting_audio_decoder.cc ('k') | media/filters/decrypting_demuxer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698