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

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

Issue 140823010: ResourceFetcher: Add POST support and the ability to set headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Gack Created 6 years, 11 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
===================================================================
--- content/renderer/fetchers/resource_fetcher_impl.h (revision 244609)
+++ content/renderer/fetchers/resource_fetcher_impl.h (working copy)
@@ -31,22 +31,22 @@
public blink::WebURLLoaderClient {
public:
// ResourceFetcher implementation:
+ virtual void SetMethod(const std::string& method) OVERRIDE;
+ virtual void SetBody(const std::string& body) OVERRIDE;
+ virtual void SetHeader(const std::string& header,
+ const std::string& value) OVERRIDE;
+ virtual void Start(blink::WebFrame* frame,
+ blink::WebURLRequest::TargetType target_type,
+ const Callback& callback) OVERRIDE;
virtual void SetTimeout(const base::TimeDelta& timeout) OVERRIDE;
private:
friend class ResourceFetcher;
- ResourceFetcherImpl(
- const GURL& url, blink::WebFrame* frame,
- blink::WebURLRequest::TargetType target_type,
- const Callback& callback);
+ explicit ResourceFetcherImpl(const GURL& url);
virtual ~ResourceFetcherImpl();
- // Start the actual download.
- void Start(const GURL& url, blink::WebFrame* frame,
- blink::WebURLRequest::TargetType target_type);
-
void RunCallback(const blink::WebURLResponse& response,
const std::string& data);
@@ -76,6 +76,9 @@
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_;

Powered by Google App Engine
This is Rietveld 408576698