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

Unified Diff: media/blink/resource_multibuffer_data_provider.h

Issue 2399463007: AssociatedURLLoader shouldn't derive from WebURLLoader (Closed)
Patch Set: Rebase Created 4 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 | « media/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/resource_multibuffer_data_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/resource_multibuffer_data_provider.h
diff --git a/media/blink/resource_multibuffer_data_provider.h b/media/blink/resource_multibuffer_data_provider.h
index c1f1a1d9c70e3bb89230dee48a307280c753a620..a019ccfe87020c734be3c4078baf22bbf067d157 100644
--- a/media/blink/resource_multibuffer_data_provider.h
+++ b/media/blink/resource_multibuffer_data_provider.h
@@ -16,17 +16,20 @@
#include "media/blink/media_blink_export.h"
#include "media/blink/multibuffer.h"
#include "media/blink/url_index.h"
-#include "third_party/WebKit/public/platform/WebURLLoader.h"
-#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
+#include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "url/gurl.h"
+namespace blink {
+class WebAssociatedURLLoader;
+} // namespace blink
+
namespace media {
class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider
: NON_EXPORTED_BASE(public MultiBuffer::DataProvider),
- NON_EXPORTED_BASE(public blink::WebURLLoaderClient) {
+ NON_EXPORTED_BASE(public blink::WebAssociatedURLLoaderClient) {
public:
// NUmber of times we'll retry if the connection fails.
enum { kMaxRetries = 30 };
@@ -44,31 +47,18 @@ class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider
scoped_refptr<DataBuffer> Read() override;
void SetDeferred(bool defer) override;
- // blink::WebURLLoaderClient implementation.
+ // blink::WebAssociatedURLLoaderClient implementation.
bool willFollowRedirect(
- blink::WebURLLoader* loader,
- blink::WebURLRequest& newRequest,
+ const blink::WebURLRequest& newRequest,
const blink::WebURLResponse& redirectResponse) override;
- void didSendData(blink::WebURLLoader* loader,
- unsigned long long bytesSent,
+ void didSendData(unsigned long long bytesSent,
unsigned long long totalBytesToBeSent) override;
- void didReceiveResponse(blink::WebURLLoader* loader,
- const blink::WebURLResponse& response) override;
- void didDownloadData(blink::WebURLLoader* loader,
- int data_length,
- int encoded_data_length) override;
- void didReceiveData(blink::WebURLLoader* loader,
- const char* data,
- int data_length,
- int encoded_data_length,
- int encoded_body_length) override;
- void didReceiveCachedMetadata(blink::WebURLLoader* loader,
- const char* data,
- int dataLength) override;
- void didFinishLoading(blink::WebURLLoader* loader,
- double finishTime,
- int64_t total_encoded_data_length) override;
- void didFail(blink::WebURLLoader* loader, const blink::WebURLError&) override;
+ void didReceiveResponse(const blink::WebURLResponse& response) override;
+ void didDownloadData(int data_length) override;
+ void didReceiveData(const char* data, int data_length) override;
+ void didReceiveCachedMetadata(const char* data, int dataLength) override;
+ void didFinishLoading(double finishTime) override;
+ void didFail(const blink::WebURLError&) override;
// Use protected instead of private for testing purposes.
protected:
@@ -120,11 +110,11 @@ class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider
// const to make it obvious that redirects cannot change it.
const GURL origin_;
- // Keeps track of an active WebURLLoader and associated state.
+ // Keeps track of an active WebAssociatedURLLoader and associated state.
std::unique_ptr<ActiveLoader> active_loader_;
- // Injected WebURLLoader instance for testing purposes.
- std::unique_ptr<blink::WebURLLoader> test_loader_;
+ // Injected WebAssociatedURLLoader instance for testing purposes.
+ std::unique_ptr<blink::WebAssociatedURLLoader> test_loader_;
// When we encounter a redirect, this is the source of the redirect.
GURL redirects_to_;
« no previous file with comments | « media/blink/multibuffer_data_source_unittest.cc ('k') | media/blink/resource_multibuffer_data_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698