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

Side by Side Diff: media/base/composite_filter.cc

Issue 8934002: Un-DISABLE media_unittests:CompositeFilterDeathTest.TestRemoveUnknownFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/composite_filter_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base/composite_filter.h" 5 #include "media/base/composite_filter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 LOG(FATAL) << "Unknown filter, or in unexpected state."; 75 LOG(FATAL) << "Unknown filter, or in unexpected state.";
76 76
77 for (FilterVector::iterator it = filters_.begin(); 77 for (FilterVector::iterator it = filters_.begin();
78 it != filters_.end(); ++it) { 78 it != filters_.end(); ++it) {
79 if (it->get() != filter.get()) 79 if (it->get() != filter.get())
80 continue; 80 continue;
81 filters_.erase(it); 81 filters_.erase(it);
82 filter->clear_host(); 82 filter->clear_host();
83 return; 83 return;
84 } 84 }
85 NOTREACHED() << "Filter missing."; 85 LOG(FATAL) << "Filter missing.";
86 } 86 }
87 87
88 void CompositeFilter::set_host(FilterHost* host) { 88 void CompositeFilter::set_host(FilterHost* host) {
89 DCHECK_EQ(message_loop_, MessageLoop::current()); 89 DCHECK_EQ(message_loop_, MessageLoop::current());
90 DCHECK(host); 90 DCHECK(host);
91 DCHECK(!host_impl_.get()); 91 DCHECK(!host_impl_.get());
92 host_impl_.reset(new FilterHostImpl(this, host)); 92 host_impl_.reset(new FilterHostImpl(this, host));
93 } 93 }
94 94
95 FilterHost* CompositeFilter::host() { 95 FilterHost* CompositeFilter::host() {
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 void CompositeFilter::FilterHostImpl::SetCurrentReadPosition(int64 offset) { 545 void CompositeFilter::FilterHostImpl::SetCurrentReadPosition(int64 offset) {
546 host_->SetCurrentReadPosition(offset); 546 host_->SetCurrentReadPosition(offset);
547 } 547 }
548 548
549 int64 CompositeFilter::FilterHostImpl::GetCurrentReadPosition() { 549 int64 CompositeFilter::FilterHostImpl::GetCurrentReadPosition() {
550 return host_->GetCurrentReadPosition(); 550 return host_->GetCurrentReadPosition();
551 } 551 }
552 552
553 } // namespace media 553 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698