| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 5 #ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
| 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ | 6 #define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // VerifyPartialResponse (a private method). | 82 // VerifyPartialResponse (a private method). |
| 83 static bool ParseContentRange(const std::string& content_range_str, | 83 static bool ParseContentRange(const std::string& content_range_str, |
| 84 int64_t* first_byte_position, | 84 int64_t* first_byte_position, |
| 85 int64_t* last_byte_position, | 85 int64_t* last_byte_position, |
| 86 int64_t* instance_size); | 86 int64_t* instance_size); |
| 87 | 87 |
| 88 int64_t byte_pos() const; | 88 int64_t byte_pos() const; |
| 89 int64_t block_size() const; | 89 int64_t block_size() const; |
| 90 | 90 |
| 91 // If we have made a range request, verify the response from the server. | 91 // If we have made a range request, verify the response from the server. |
| 92 bool VerifyPartialResponse(const blink::WebURLResponse& response); | 92 bool VerifyPartialResponse(const blink::WebURLResponse& response, |
| 93 const scoped_refptr<UrlData>& url_data); |
| 93 | 94 |
| 94 // Current Position. | 95 // Current Position. |
| 95 MultiBufferBlockId pos_; | 96 MultiBufferBlockId pos_; |
| 96 | 97 |
| 97 // This is where we actually get read data from. | 98 // This is where we actually get read data from. |
| 98 // We don't need (or want) a scoped_refptr for this one, because | 99 // We don't need (or want) a scoped_refptr for this one, because |
| 99 // we are owned by it. Note that we may change this when we encounter | 100 // we are owned by it. Note that we may change this when we encounter |
| 100 // a redirect because we actually change ownership. | 101 // a redirect because we actually change ownership. |
| 101 UrlData* url_data_; | 102 UrlData* url_data_; |
| 102 | 103 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 122 | 123 |
| 123 // When we encounter a redirect, this is the source of the redirect. | 124 // When we encounter a redirect, this is the source of the redirect. |
| 124 GURL redirects_to_; | 125 GURL redirects_to_; |
| 125 | 126 |
| 126 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; | 127 base::WeakPtrFactory<ResourceMultiBufferDataProvider> weak_factory_; |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 } // namespace media | 130 } // namespace media |
| 130 | 131 |
| 131 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ | 132 #endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_RESOURCE_LOADER_H_ |
| OLD | NEW |