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

Unified Diff: content/browser/renderer_host/resource_handler.h

Issue 10501004: Refactor the guts of ResourceDispatcherHostImpl into a new class named (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/browser/renderer_host/resource_handler.h
===================================================================
--- content/browser/renderer_host/resource_handler.h (revision 141889)
+++ content/browser/renderer_host/resource_handler.h (working copy)
@@ -28,6 +28,7 @@
} // namespace net
namespace content {
+class ResourceController;
struct ResourceResponse;
// The resource dispatcher host uses this interface to process network events
@@ -38,6 +39,9 @@
public:
virtual ~ResourceHandler() {}
+ // Sets the controller for this handler.
+ virtual void SetController(ResourceController* controller);
+
// Called as upload progress is made. The return value is ignored.
virtual bool OnUploadProgress(int request_id,
uint64 position,
@@ -101,6 +105,13 @@
// calls are consumed by the RedirectToFileResourceHandler and replaced
// with OnDataDownloaded calls.
virtual void OnDataDownloaded(int request_id, int bytes_downloaded) {}
+
+ protected:
+ ResourceHandler() : controller_(NULL) {}
+ ResourceController* controller() { return controller_; }
+
+ private:
+ ResourceController* controller_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698