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

Unified Diff: components/nacl/renderer/manifest_downloader.cc

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 | « components/nacl/renderer/manifest_downloader.h ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/manifest_downloader.cc
diff --git a/components/nacl/renderer/manifest_downloader.cc b/components/nacl/renderer/manifest_downloader.cc
index e19b3f1e6702329583f9e9eace2464279f3ec1d4..4ef244dbe702a1c4d438b10f3e825224094e6ce2 100644
--- a/components/nacl/renderer/manifest_downloader.cc
+++ b/components/nacl/renderer/manifest_downloader.cc
@@ -13,11 +13,12 @@
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLLoader.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
+#include "third_party/WebKit/public/web/WebAssociatedURLLoader.h"
namespace nacl {
ManifestDownloader::ManifestDownloader(
- std::unique_ptr<blink::WebURLLoader> url_loader,
+ std::unique_ptr<blink::WebAssociatedURLLoader> url_loader,
bool is_installed,
Callback cb)
: url_loader_(std::move(url_loader)),
@@ -35,18 +36,13 @@ void ManifestDownloader::Load(const blink::WebURLRequest& request) {
}
void ManifestDownloader::didReceiveResponse(
- blink::WebURLLoader* loader,
const blink::WebURLResponse& response) {
if (response.httpStatusCode() != 200)
pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_LOAD_URL;
status_code_ = response.httpStatusCode();
}
-void ManifestDownloader::didReceiveData(blink::WebURLLoader* loader,
- const char* data,
- int data_length,
- int encoded_data_length,
- int encoded_body_length) {
+void ManifestDownloader::didReceiveData(const char* data, int data_length) {
if (buffer_.size() + data_length > kNaClManifestMaxFileBytes) {
pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_TOO_LARGE;
buffer_.clear();
@@ -68,16 +64,11 @@ void ManifestDownloader::Close() {
delete this;
}
-void ManifestDownloader::didFinishLoading(
- blink::WebURLLoader* loader,
- double finish_time,
- int64_t total_encoded_data_length) {
+void ManifestDownloader::didFinishLoading(double finish_time) {
Close();
}
-void ManifestDownloader::didFail(
- blink::WebURLLoader* loader,
- const blink::WebURLError& error) {
+void ManifestDownloader::didFail(const blink::WebURLError& error) {
// TODO(teravest): Find a place to share this code with PepperURLLoaderHost.
pp_nacl_error_ = PP_NACL_ERROR_MANIFEST_LOAD_URL;
if (error.domain.equals(blink::WebString::fromUTF8(net::kErrorDomain))) {
« no previous file with comments | « components/nacl/renderer/manifest_downloader.h ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698