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

Side by Side Diff: media/blink/multibuffer_data_source.cc

Issue 1993083002: The cross-origin checks in the multibuffer code are not sufficient, as they only trigger when a red… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | media/blink/multibuffer_data_source_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 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
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 base::AutoLock auto_lock(lock_);
194 base::AutoLock auto_lock(lock_); 194 StopInternal_Locked();
195 StopInternal_Locked();
196 }
197 StopLoader();
198 } 195 }
196 StopLoader();
199 return; 197 return;
200 } 198 }
201 if (url_data_->url().GetOrigin() != destination->url().GetOrigin()) { 199 if (url_data_->url().GetOrigin() != destination->url().GetOrigin()) {
202 single_origin_ = false; 200 single_origin_ = false;
203 } 201 }
204 reader_.reset(nullptr); 202 reader_.reset(nullptr);
205 url_data_ = destination; 203 url_data_ = destination;
206 204
207 if (url_data_) { 205 if (url_data_) {
208 url_data_->OnRedirect( 206 url_data_->OnRedirect(
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 reader_->SetMaxBuffer(back_buffer, preload + kPreloadHighExtra); 582 reader_->SetMaxBuffer(back_buffer, preload + kPreloadHighExtra);
585 583
586 if (preload_ == METADATA) { 584 if (preload_ == METADATA) {
587 reader_->SetPreload(0, 0); 585 reader_->SetPreload(0, 0);
588 } else { 586 } else {
589 reader_->SetPreload(preload + kPreloadHighExtra, preload); 587 reader_->SetPreload(preload + kPreloadHighExtra, preload);
590 } 588 }
591 } 589 }
592 590
593 } // namespace media 591 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/blink/multibuffer_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698