namespace net {
+class HttpRequestHeaders;
class HttpResponseHeaders;
class HttpResponseInfo;
class HttpTransaction;
class HttpUserAgentSettings;
+class ProxyInfo;
class UploadDataStream;
class URLRequestContext;
NetworkDelegate* network_delegate,
const HttpUserAgentSettings* http_user_agent_settings);
- virtual ~URLRequestHttpJob();
+ ~URLRequestHttpJob() override;
// Overridden from URLRequestJob:
- virtual void SetPriority(RequestPriority priority) OVERRIDE;
- virtual void Start() OVERRIDE;
- virtual void Kill() OVERRIDE;
+ void SetPriority(RequestPriority priority) override;
+ void Start() override;
+ void Kill() override;
RequestPriority priority() const {
return priority_;
void OnStartCompleted(int result);
void OnReadCompleted(int result);
void NotifyBeforeSendHeadersCallback(int result);
+ void NotifyBeforeSendProxyHeadersCallback(
+ const ProxyInfo& proxy_info,
+ HttpRequestHeaders* request_headers);
void RestartTransactionWithAuth(const AuthCredentials& credentials);
// Overridden from URLRequestJob:
- virtual void SetUpload(UploadDataStream* upload) OVERRIDE;
- virtual void SetExtraRequestHeaders(
- const HttpRequestHeaders& headers) OVERRIDE;
- virtual LoadState GetLoadState() const OVERRIDE;
- virtual UploadProgress GetUploadProgress() const OVERRIDE;
- virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
- virtual bool GetCharset(std::string* charset) OVERRIDE;
- virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE;
- virtual void GetLoadTimingInfo(
- LoadTimingInfo* load_timing_info) const OVERRIDE;
- virtual bool GetResponseCookies(std::vector<std::string>* cookies) OVERRIDE;
- virtual int GetResponseCode() const OVERRIDE;
- virtual Filter* SetupFilter() const OVERRIDE;
- virtual bool IsSafeRedirect(const GURL& location) OVERRIDE;
- virtual bool NeedsAuth() OVERRIDE;
- virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) OVERRIDE;
- virtual void SetAuth(const AuthCredentials& credentials) OVERRIDE;
- virtual void CancelAuth() OVERRIDE;
- virtual void ContinueWithCertificate(X509Certificate* client_cert) OVERRIDE;
- virtual void ContinueDespiteLastError() OVERRIDE;
- virtual void ResumeNetworkStart() OVERRIDE;
- virtual bool ReadRawData(IOBuffer* buf, int buf_size,
- int* bytes_read) OVERRIDE;
- virtual void StopCaching() OVERRIDE;
- virtual bool GetFullRequestHeaders(
- HttpRequestHeaders* headers) const OVERRIDE;
- virtual int64 GetTotalReceivedBytes() const OVERRIDE;
- virtual void DoneReading() OVERRIDE;
- virtual void DoneReadingRedirectResponse() OVERRIDE;
-
- virtual HostPortPair GetSocketAddress() const OVERRIDE;
- virtual void NotifyURLRequestDestroyed() OVERRIDE;
+ void SetUpload(UploadDataStream* upload) override;
+ void SetExtraRequestHeaders(const HttpRequestHeaders& headers) override;
+ LoadState GetLoadState() const override;
+ UploadProgress GetUploadProgress() const override;
+ bool GetMimeType(std::string* mime_type) const override;
+ bool GetCharset(std::string* charset) override;
+ void GetResponseInfo(HttpResponseInfo* info) override;
+ void GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
+ bool GetResponseCookies(std::vector<std::string>* cookies) override;
+ int GetResponseCode() const override;
+ Filter* SetupFilter() const override;
+ bool CopyFragmentOnRedirect(const GURL& location) const override;
+ bool IsSafeRedirect(const GURL& location) override;
+ bool NeedsAuth() override;
+ void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) override;
+ void SetAuth(const AuthCredentials& credentials) override;
+ void CancelAuth() override;
+ void ContinueWithCertificate(X509Certificate* client_cert) override;
+ void ContinueDespiteLastError() override;
+ void ResumeNetworkStart() override;
+ bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
+ void StopCaching() override;
+ bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
+ int64 GetTotalReceivedBytes() const override;
+ void DoneReading() override;
+ void DoneReadingRedirectResponse() override;
+
+ HostPortPair GetSocketAddress() const override;
+ void NotifyURLRequestDestroyed() override;
void RecordTimer();
void ResetTimer();
- virtual void UpdatePacketReadTimes() OVERRIDE;
+ void UpdatePacketReadTimes() override;
void RecordPacketStats(FilterContext::StatisticSelector statistic) const;
void RecordCompressionHistograms();
bool read_in_progress_;
- // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header.
- GURL sdch_dictionary_url_;
-
scoped_ptr<HttpTransaction> transaction_;
// This is used to supervise traffic and enforce exponential
base::TimeTicks receive_headers_end_;
scoped_ptr<HttpFilterContext> filter_context_;
- base::WeakPtrFactory<URLRequestHttpJob> weak_factory_;
CompletionCallback on_headers_received_callback_;
scoped_refptr<HttpResponseHeaders> override_response_headers_;
// The network delegate can mark a URL as safe for redirection.
+ // The reference fragment of the original URL is not appended to the redirect
+ // URL when the redirect URL is equal to |allowed_unsafe_redirect_url_|.
GURL allowed_unsafe_redirect_url_;
// Flag used to verify that |this| is not deleted while we are awaiting
const HttpUserAgentSettings* http_user_agent_settings_;
+ base::WeakPtrFactory<URLRequestHttpJob> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
};