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

Unified Diff: media/blink/buffered_data_source.cc

Issue 1418533005: Add event to media log if origin changes during playback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/buffered_data_source.cc
diff --git a/media/blink/buffered_data_source.cc b/media/blink/buffered_data_source.cc
index 0fc16175ff4ec782c1766ab206ec2b52416b62a2..0aa85613c4907079308723957840fff36c3a1eb3 100644
--- a/media/blink/buffered_data_source.cc
+++ b/media/blink/buffered_data_source.cc
@@ -432,9 +432,14 @@ bool BufferedDataSource::CheckPartialResponseURL(
// for details.
// If the origin of the new response is different from the first response we
// deny the redirected response unless the crossorigin attribute has been set.
- return (response_original_url_.GetOrigin() ==
- partial_response_original_url.GetOrigin()) ||
- DidPassCORSAccessCheck();
+ if ((response_original_url_.GetOrigin() ==
+ partial_response_original_url.GetOrigin()) ||
+ DidPassCORSAccessCheck()) {
+ return true;
+ }
+
+ MEDIA_LOG(ERROR, media_log_) << "BufferedDataSource: origin has changed";
+ return false;
}
void BufferedDataSource::ReadCallback(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698