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

Side by Side Diff: media/filters/decrypting_demuxer_stream_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_demuxer_stream.cc ('k') | media/filters/decrypting_video_decoder.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 27 matching lines...) Expand all
38 0, 38 0,
39 std::vector<SubsampleEntry>()))); 39 std::vector<SubsampleEntry>())));
40 return buffer; 40 return buffer;
41 } 41 }
42 42
43 // Use anonymous namespace here to prevent the actions to be defined multiple 43 // Use anonymous namespace here to prevent the actions to be defined multiple
44 // times across multiple test files. Sadly we can't use static for them. 44 // times across multiple test files. Sadly we can't use static for them.
45 namespace { 45 namespace {
46 46
47 ACTION_P(ReturnBuffer, buffer) { 47 ACTION_P(ReturnBuffer, buffer) {
48 arg0.Run(buffer ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer); 48 arg0.Run(buffer.get() ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer);
49 } 49 }
50 50
51 ACTION_P(RunCallbackIfNotNull, param) { 51 ACTION_P(RunCallbackIfNotNull, param) {
52 if (!arg0.is_null()) 52 if (!arg0.is_null())
53 arg0.Run(param); 53 arg0.Run(param);
54 } 54 }
55 55
56 ACTION_P2(ResetAndRunCallback, callback, param) { 56 ACTION_P2(ResetAndRunCallback, callback, param) {
57 base::ResetAndReturn(callback).Run(param); 57 base::ResetAndReturn(callback).Run(param);
58 } 58 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 input_audio_stream_->set_audio_decoder_config(new_config); 409 input_audio_stream_->set_audio_decoder_config(new_config);
410 410
411 EXPECT_CALL(*input_audio_stream_, Read(_)) 411 EXPECT_CALL(*input_audio_stream_, Read(_))
412 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged, 412 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged,
413 scoped_refptr<DecoderBuffer>())); 413 scoped_refptr<DecoderBuffer>()));
414 414
415 ReadAndExpectBufferReadyWith(DemuxerStream::kConfigChanged, NULL); 415 ReadAndExpectBufferReadyWith(DemuxerStream::kConfigChanged, NULL);
416 } 416 }
417 417
418 } // namespace media 418 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decrypting_demuxer_stream.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698