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

Unified Diff: content/renderer/fetchers/resource_fetcher_impl.h

Issue 532773002: Implement ManifestFetcher, helper to fetch Web Manifests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: content/renderer/fetchers/resource_fetcher_impl.h
diff --git a/content/renderer/fetchers/resource_fetcher_impl.h b/content/renderer/fetchers/resource_fetcher_impl.h
index 74c9919df2e76caf8092ac491507361ff56c7fe0..5631ed9267de5b1391fec2c11c1976b001fe9457 100644
--- a/content/renderer/fetchers/resource_fetcher_impl.h
+++ b/content/renderer/fetchers/resource_fetcher_impl.h
@@ -13,7 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/timer/timer.h"
#include "content/public/renderer/resource_fetcher.h"
-#include "third_party/WebKit/public/platform/WebURLLoaderClient.h"
+#include "content/renderer/fetchers/web_url_loader_client_impl.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
@@ -28,7 +28,7 @@ struct WebURLError;
namespace content {
class ResourceFetcherImpl : public ResourceFetcher,
- public blink::WebURLLoaderClient {
+ public WebURLLoaderClientImpl {
public:
// ResourceFetcher implementation:
virtual void SetMethod(const std::string& method) OVERRIDE;
@@ -38,6 +38,7 @@ class ResourceFetcherImpl : public ResourceFetcher,
virtual void Start(blink::WebFrame* frame,
blink::WebURLRequest::RequestContext request_context,
blink::WebURLRequest::FrameType frame_type,
+ LoaderType loader_type,
const Callback& callback) OVERRIDE;
virtual void SetTimeout(const base::TimeDelta& timeout) OVERRIDE;
@@ -48,54 +49,22 @@ class ResourceFetcherImpl : public ResourceFetcher,
virtual ~ResourceFetcherImpl();
- void RunCallback(const blink::WebURLResponse& response,
- const std::string& data);
-
// Callback for timer that limits how long we wait for the server. If this
// timer fires and the request hasn't completed, we kill the request.
void TimeoutFired();
- // WebURLLoaderClient methods:
- virtual void willSendRequest(
- blink::WebURLLoader* loader, blink::WebURLRequest& new_request,
- const blink::WebURLResponse& redirect_response);
- virtual void didSendData(
- blink::WebURLLoader* loader, unsigned long long bytes_sent,
- unsigned long long total_bytes_to_be_sent);
- virtual void didReceiveResponse(
- blink::WebURLLoader* loader, const blink::WebURLResponse& response);
- virtual void didReceiveCachedMetadata(
- blink::WebURLLoader* loader, const char* data, int data_length);
-
- virtual void didReceiveData(
- blink::WebURLLoader* loader, const char* data, int data_length,
- int encoded_data_length);
- virtual void didFinishLoading(
- blink::WebURLLoader* loader, double finishTime,
- int64_t total_encoded_data_length);
- virtual void didFail(
- blink::WebURLLoader* loader, const blink::WebURLError& error);
+ // WebURLLoaderClientImpl methods:
+ virtual void OnLoadComplete() OVERRIDE;
+ virtual void Cancel() OVERRIDE;
scoped_ptr<blink::WebURLLoader> loader_;
// Request to send. Released once Start() is called.
blink::WebURLRequest request_;
- // Set to true once the request is complete.
- bool completed_;
-
- // Buffer to hold the content from the server.
- std::string data_;
-
- // A copy of the original resource response.
- blink::WebURLResponse response_;
-
// Callback when we're done.
Callback callback_;
- // Buffer to hold metadata from the cache.
- std::string metadata_;
-
// Limit how long to wait for the server.
base::OneShotTimer<ResourceFetcherImpl> timeout_timer_;

Powered by Google App Engine
This is Rietveld 408576698