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

Unified Diff: components/nacl/renderer/file_downloader.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 | « chrome/renderer/net/net_error_helper.cc ('k') | components/nacl/renderer/file_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/file_downloader.h
diff --git a/components/nacl/renderer/file_downloader.h b/components/nacl/renderer/file_downloader.h
index 4b4665fdca091a3586cb93f6c65734603ba01686..91e8bc32c27a03db6da54abd682ed9837d4c7f23 100644
--- a/components/nacl/renderer/file_downloader.h
+++ b/components/nacl/renderer/file_downloader.h
@@ -9,9 +9,10 @@
#include "base/callback.h"
#include "base/files/file.h"
#include "components/nacl/renderer/ppb_nacl_private.h"
-#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
+#include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h"
namespace blink {
+class WebAssociatedURLLoader;
struct WebURLError;
class WebURLLoader;
class WebURLResponse;
@@ -21,7 +22,7 @@ namespace nacl {
// Downloads a file and writes the contents to a specified file open for
// writing.
-class FileDownloader : public blink::WebURLLoaderClient {
+class FileDownloader : public blink::WebAssociatedURLLoaderClient {
public:
enum Status {
SUCCESS,
@@ -36,7 +37,7 @@ class FileDownloader : public blink::WebURLLoaderClient {
// received.
typedef base::Callback<void(int64_t, int64_t)> ProgressCallback;
- FileDownloader(std::unique_ptr<blink::WebURLLoader> url_loader,
+ FileDownloader(std::unique_ptr<blink::WebAssociatedURLLoader> url_loader,
base::File file,
StatusCallback status_cb,
ProgressCallback progress_cb);
@@ -46,21 +47,13 @@ class FileDownloader : public blink::WebURLLoaderClient {
void Load(const blink::WebURLRequest& request);
private:
- // WebURLLoaderClient implementation.
- void didReceiveResponse(blink::WebURLLoader* loader,
- const blink::WebURLResponse& response) override;
- void didReceiveData(blink::WebURLLoader* loader,
- const char* data,
- int data_length,
- int encoded_data_length,
- int encoded_body_length) override;
- void didFinishLoading(blink::WebURLLoader* loader,
- double finish_time,
- int64_t total_encoded_data_length) override;
- void didFail(blink::WebURLLoader* loader,
- const blink::WebURLError& error) override;
+ // WebAssociatedURLLoaderClient implementation.
+ void didReceiveResponse(const blink::WebURLResponse& response) override;
+ void didReceiveData(const char* data, int data_length) override;
+ void didFinishLoading(double finish_time) override;
+ void didFail(const blink::WebURLError& error) override;
- std::unique_ptr<blink::WebURLLoader> url_loader_;
+ std::unique_ptr<blink::WebAssociatedURLLoader> url_loader_;
base::File file_;
StatusCallback status_cb_;
ProgressCallback progress_cb_;
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | components/nacl/renderer/file_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698