| Index: content/browser/renderer_host/resource_request_info_impl.h
|
| ===================================================================
|
| --- content/browser/renderer_host/resource_request_info_impl.h (revision 141889)
|
| +++ content/browser/renderer_host/resource_request_info_impl.h (working copy)
|
| @@ -20,8 +20,6 @@
|
| #include "net/base/load_states.h"
|
| #include "webkit/glue/resource_type.h"
|
|
|
| -class SSLClientAuthHandler;
|
| -
|
| namespace webkit_blob {
|
| class BlobData;
|
| }
|
| @@ -29,9 +27,7 @@
|
| namespace content {
|
| class CrossSiteResourceHandler;
|
| class ResourceContext;
|
| -class ResourceDispatcherHostImpl;
|
| -class ResourceDispatcherHostLoginDelegate;
|
| -class ResourceHandler;
|
| +struct GlobalRequestID;
|
|
|
| // Holds the data ResourceDispatcherHost associates with each request.
|
| // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest.
|
| @@ -46,9 +42,7 @@
|
| static const ResourceRequestInfoImpl* ForRequest(
|
| const net::URLRequest* request);
|
|
|
| - // This will take a reference to the handler.
|
| CONTENT_EXPORT ResourceRequestInfoImpl(
|
| - scoped_ptr<ResourceHandler> handler,
|
| ProcessType process_type,
|
| int child_id,
|
| int route_id,
|
| @@ -86,12 +80,8 @@
|
|
|
| void AssociateWithRequest(net::URLRequest* request);
|
|
|
| - // Top-level ResourceHandler servicing this request.
|
| - ResourceHandler* resource_handler() { return resource_handler_.get(); }
|
| + GlobalRequestID GetGlobalRequestID() const;
|
|
|
| - // Inserts a DoomedResourceHandler in front of the existing ResourceHandler.
|
| - void InsertDoomedResourceHandler();
|
| -
|
| // CrossSiteResourceHandler for this request, if it is a cross-site request.
|
| // (NULL otherwise.) This handler is part of the chain of ResourceHandlers
|
| // pointed to by resource_handler, and is not owned by this class.
|
| @@ -102,19 +92,6 @@
|
| cross_site_handler_ = h;
|
| }
|
|
|
| - // Pointer to the login delegate, or NULL if there is none for this request.
|
| - ResourceDispatcherHostLoginDelegate* login_delegate() const {
|
| - return login_delegate_.get();
|
| - }
|
| - CONTENT_EXPORT void set_login_delegate(
|
| - ResourceDispatcherHostLoginDelegate* ld);
|
| -
|
| - // Pointer to the SSL auth, or NULL if there is none for this request.
|
| - SSLClientAuthHandler* ssl_client_auth_handler() const {
|
| - return ssl_client_auth_handler_.get();
|
| - }
|
| - void set_ssl_client_auth_handler(SSLClientAuthHandler* s);
|
| -
|
| // Identifies the type of process (renderer, plugin, etc.) making the request.
|
| ProcessType process_type() const {
|
| return process_type_;
|
| @@ -135,36 +112,10 @@
|
| bool is_download() const { return is_download_; }
|
| void set_is_download(bool download) { is_download_ = download; }
|
|
|
| - // The number of clients that have called pause on this request.
|
| - int pause_count() const { return pause_count_; }
|
| - void set_pause_count(int count) { pause_count_ = count; }
|
| -
|
| PageTransition transition_type() const { return transition_type_; }
|
|
|
| void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; }
|
|
|
| - // When we're uploading data, this is the the byte offset into the uploaded
|
| - // data that we've uploaded that we've send an upload progress update about.
|
| - // The ResourceDispatcherHost will periodically update this value to track
|
| - // upload progress and make sure it doesn't sent out duplicate updates.
|
| - uint64 last_upload_position() const { return last_upload_position_; }
|
| - void set_last_upload_position(uint64 p) { last_upload_position_ = p; }
|
| -
|
| - // Indicates when the ResourceDispatcherHost last update the upload
|
| - // position. This is used to make sure we don't send too many updates.
|
| - base::TimeTicks last_upload_ticks() const { return last_upload_ticks_; }
|
| - void set_last_upload_ticks(base::TimeTicks t) { last_upload_ticks_ = t; }
|
| -
|
| - // Set when the ResourceDispatcherHost has sent out an upload progress, and
|
| - // cleared whtn the ACK is received. This is used to throttle updates so
|
| - // multiple updates aren't in flight at once.
|
| - bool waiting_for_upload_progress_ack() const {
|
| - return waiting_for_upload_progress_ack_;
|
| - }
|
| - void set_waiting_for_upload_progress_ack(bool waiting) {
|
| - waiting_for_upload_progress_ack_ = waiting;
|
| - }
|
| -
|
| // The approximate in-memory size (bytes) that we credited this request
|
| // as consuming in |outstanding_requests_memory_cost_map_|.
|
| int memory_cost() const { return memory_cost_; }
|
| @@ -178,44 +129,9 @@
|
| void set_requested_blob_data(webkit_blob::BlobData* data);
|
|
|
| private:
|
| - friend class ResourceDispatcherHostImpl;
|
| -
|
| - // Request is temporarily not handling network data. Should be used only
|
| - // by the ResourceDispatcherHost, not the event handlers (accessors are
|
| - // provided for consistency with the rest of the interface).
|
| - bool is_paused() const { return is_paused_; }
|
| - void set_is_paused(bool paused) { is_paused_ = paused; }
|
| -
|
| - // Whether we called OnResponseStarted for this request or not. Should be used
|
| - // only by the ResourceDispatcherHost, not the event handlers (accessors are
|
| - // provided for consistency with the rest of the interface).
|
| - bool called_on_response_started() const {
|
| - return called_on_response_started_;
|
| - }
|
| - void set_called_on_response_started(bool called) {
|
| - called_on_response_started_ = called;
|
| - }
|
| -
|
| - // Whether this request has started reading any bytes from the response
|
| - // yet. Will be true after the first (unpaused) call to Read. Should be used
|
| - // only by the ResourceDispatcherHost, not the event handlers (accessors are
|
| - // provided for consistency with the rest of the interface).
|
| - bool has_started_reading() const { return has_started_reading_; }
|
| - void set_has_started_reading(bool reading) { has_started_reading_ = reading; }
|
| -
|
| - // How many bytes have been read while this request has been paused. Should be
|
| - // used only by the ResourceDispatcherHost, not the event handlers (accessors
|
| - // are provided for consistency with the rest of the interface).
|
| - int paused_read_bytes() const { return paused_read_bytes_; }
|
| - void set_paused_read_bytes(int bytes) { paused_read_bytes_ = bytes; }
|
| -
|
| - scoped_ptr<ResourceHandler> resource_handler_;
|
| -
|
| // Non-owning, may be NULL.
|
| CrossSiteResourceHandler* cross_site_handler_;
|
|
|
| - scoped_refptr<ResourceDispatcherHostLoginDelegate> login_delegate_;
|
| - scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_;
|
| ProcessType process_type_;
|
| int child_id_;
|
| int route_id_;
|
| @@ -229,25 +145,14 @@
|
| bool is_download_;
|
| bool allow_download_;
|
| bool has_user_gesture_;
|
| - int pause_count_;
|
| ResourceType::Type resource_type_;
|
| PageTransition transition_type_;
|
| uint64 upload_size_;
|
| - uint64 last_upload_position_;
|
| - base::TimeTicks last_upload_ticks_;
|
| - bool waiting_for_upload_progress_ack_;
|
| int memory_cost_;
|
| scoped_refptr<webkit_blob::BlobData> requested_blob_data_;
|
| WebKit::WebReferrerPolicy referrer_policy_;
|
| ResourceContext* context_;
|
|
|
| - // "Private" data accessible only to ResourceDispatcherHost (use the
|
| - // accessors above for consistency).
|
| - bool is_paused_;
|
| - bool called_on_response_started_;
|
| - bool has_started_reading_;
|
| - int paused_read_bytes_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
|
| };
|
|
|
|
|