Index: media/blink/buffered_data_source.h |
diff --git a/media/blink/buffered_data_source.h b/media/blink/buffered_data_source.h |
index 32f14816fcdce5a3307fb8a898c965d67f2b2c7d..72ec4e336a14f1503086f413926e22a33aef076a 100644 |
--- a/media/blink/buffered_data_source.h |
+++ b/media/blink/buffered_data_source.h |
@@ -159,6 +159,9 @@ class MEDIA_EXPORT BufferedDataSource : public DataSource { |
// when accessing ranges that are outside initial buffered region). |
void PartialReadStartCallback(BufferedResourceLoader::Status status); |
+ // Returns true if we can accept the new partial response. |
+ bool CheckPartialResponseURL(const GURL& partial_response_original_url) const; |
+ |
// BufferedResourceLoader callbacks. |
void ReadCallback(BufferedResourceLoader::Status status, int bytes_read); |
void LoadingStateChangedCallback(BufferedResourceLoader::LoadingState state); |
@@ -238,6 +241,12 @@ class MEDIA_EXPORT BufferedDataSource : public DataSource { |
DownloadingCB downloading_cb_; |
+ // The original URL of the first response. If the response is generated in a |
hubbe
2015/07/08 18:13:23
This is the URL *after* redirects, right?
Perhaps
horo
2015/07/09 00:14:27
Yes. Done.
|
+ // Service Worker this URL is empty. BufferedDataSource checks the original |
+ // URL of each successive response. If it is different from the original URL |
+ // of the first response, it is treated as an error. |
+ GURL response_original_url_; |
+ |
// Disallow rebinding WeakReference ownership to a different thread by keeping |
// a persistent reference. This avoids problems with the thread-safety of |
// reaching into this class from multiple threads to attain a WeakPtr. |