Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/blink/multibuffer_data_source.h" | 5 #include "media/blink/multibuffer_data_source.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 | 183 |
| 184 void MultibufferDataSource::OnRedirect( | 184 void MultibufferDataSource::OnRedirect( |
| 185 const scoped_refptr<UrlData>& destination) { | 185 const scoped_refptr<UrlData>& destination) { |
| 186 if (!destination) { | 186 if (!destination) { |
| 187 // A failure occured. | 187 // A failure occured. |
| 188 if (!init_cb_.is_null()) { | 188 if (!init_cb_.is_null()) { |
| 189 render_task_runner_->PostTask( | 189 render_task_runner_->PostTask( |
| 190 FROM_HERE, | 190 FROM_HERE, |
| 191 base::Bind(&MultibufferDataSource::StartCallback, weak_ptr_)); | 191 base::Bind(&MultibufferDataSource::StartCallback, weak_ptr_)); |
| 192 } else { | 192 } else { |
| 193 { | 193 { |
|
DaleCurtis
2016/05/10 22:42:09
Delete extra {} now.
hubbe
2016/05/11 00:06:38
Done.
| |
| 194 base::AutoLock auto_lock(lock_); | 194 base::AutoLock auto_lock(lock_); |
| 195 StopInternal_Locked(); | 195 StopInternal_Locked(); |
| 196 } | 196 } |
| 197 StopLoader(); | |
| 198 } | 197 } |
| 198 StopLoader(); | |
| 199 return; | 199 return; |
| 200 } | 200 } |
| 201 if (url_data_->url().GetOrigin() != destination->url().GetOrigin()) { | 201 if (url_data_->url().GetOrigin() != destination->url().GetOrigin()) { |
| 202 single_origin_ = false; | 202 single_origin_ = false; |
| 203 } | 203 } |
| 204 reader_.reset(nullptr); | 204 reader_.reset(nullptr); |
| 205 url_data_ = destination; | 205 url_data_ = destination; |
| 206 | 206 |
| 207 if (url_data_) { | 207 if (url_data_) { |
| 208 url_data_->OnRedirect( | 208 url_data_->OnRedirect( |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 583 reader_->SetPinRange(back_buffer, kMaxBufferPreload + kPreloadHighExtra); | 583 reader_->SetPinRange(back_buffer, kMaxBufferPreload + kPreloadHighExtra); |
| 584 | 584 |
| 585 if (preload_ == METADATA) { | 585 if (preload_ == METADATA) { |
| 586 reader_->SetPreload(0, 0); | 586 reader_->SetPreload(0, 0); |
| 587 } else { | 587 } else { |
| 588 reader_->SetPreload(preload_high, preload); | 588 reader_->SetPreload(preload_high, preload); |
| 589 } | 589 } |
| 590 } | 590 } |
| 591 | 591 |
| 592 } // namespace media | 592 } // namespace media |
| OLD | NEW |