| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void OnStartCompleted(int result); | 58 void OnStartCompleted(int result); |
| 59 void OnReadCompleted(int result); | 59 void OnReadCompleted(int result); |
| 60 void NotifyBeforeSendHeadersCallback(int result); | 60 void NotifyBeforeSendHeadersCallback(int result); |
| 61 | 61 |
| 62 bool ShouldTreatAsCertificateError(int result); | 62 bool ShouldTreatAsCertificateError(int result); |
| 63 | 63 |
| 64 void RestartTransactionWithAuth(const string16& username, | 64 void RestartTransactionWithAuth(const string16& username, |
| 65 const string16& password); | 65 const string16& password); |
| 66 | 66 |
| 67 // Overridden from URLRequestJob: | 67 // Overridden from URLRequestJob: |
| 68 virtual void SetUpload(UploadData* upload); | 68 virtual void SetUpload(UploadData* upload) OVERRIDE; |
| 69 virtual void SetExtraRequestHeaders(const HttpRequestHeaders& headers); | 69 virtual void SetExtraRequestHeaders( |
| 70 virtual void Start(); | 70 const HttpRequestHeaders& headers) OVERRIDE; |
| 71 virtual void Kill(); | 71 virtual void Start() OVERRIDE; |
| 72 virtual LoadState GetLoadState() const; | 72 virtual void Kill() OVERRIDE; |
| 73 virtual uint64 GetUploadProgress() const; | 73 virtual LoadState GetLoadState() const OVERRIDE; |
| 74 virtual bool GetMimeType(std::string* mime_type) const; | 74 virtual uint64 GetUploadProgress() const OVERRIDE; |
| 75 virtual bool GetCharset(std::string* charset); | 75 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
| 76 virtual void GetResponseInfo(HttpResponseInfo* info); | 76 virtual bool GetCharset(std::string* charset) OVERRIDE; |
| 77 virtual bool GetResponseCookies(std::vector<std::string>* cookies); | 77 virtual void GetResponseInfo(HttpResponseInfo* info) OVERRIDE; |
| 78 virtual int GetResponseCode() const; | 78 virtual bool GetResponseCookies(std::vector<std::string>* cookies) OVERRIDE; |
| 79 virtual Filter* SetupFilter() const; | 79 virtual int GetResponseCode() const OVERRIDE; |
| 80 virtual bool IsSafeRedirect(const GURL& location); | 80 virtual Filter* SetupFilter() const OVERRIDE; |
| 81 virtual bool NeedsAuth(); | 81 virtual bool IsSafeRedirect(const GURL& location) OVERRIDE; |
| 82 virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*); | 82 virtual bool NeedsAuth() OVERRIDE; |
| 83 virtual void GetAuthChallengeInfo(scoped_refptr<AuthChallengeInfo>*) OVERRIDE; |
| 83 virtual void SetAuth(const string16& username, | 84 virtual void SetAuth(const string16& username, |
| 84 const string16& password); | 85 const string16& password) OVERRIDE; |
| 85 virtual void CancelAuth(); | 86 virtual void CancelAuth() OVERRIDE; |
| 86 virtual void ContinueWithCertificate(X509Certificate* client_cert); | 87 virtual void ContinueWithCertificate(X509Certificate* client_cert) OVERRIDE; |
| 87 virtual void ContinueDespiteLastError(); | 88 virtual void ContinueDespiteLastError() OVERRIDE; |
| 88 virtual bool ReadRawData(IOBuffer* buf, int buf_size, int *bytes_read); | 89 virtual bool ReadRawData(IOBuffer* buf, int buf_size, |
| 89 virtual void StopCaching(); | 90 int *bytes_read) OVERRIDE; |
| 90 virtual HostPortPair GetSocketAddress() const; | 91 virtual void StopCaching() OVERRIDE; |
| 92 virtual void DoneReading() OVERRIDE; |
| 93 virtual HostPortPair GetSocketAddress() const OVERRIDE; |
| 91 | 94 |
| 92 // Keep a reference to the url request context to be sure it's not deleted | 95 // Keep a reference to the url request context to be sure it's not deleted |
| 93 // before us. | 96 // before us. |
| 94 scoped_refptr<const URLRequestContext> context_; | 97 scoped_refptr<const URLRequestContext> context_; |
| 95 | 98 |
| 96 HttpRequestInfo request_info_; | 99 HttpRequestInfo request_info_; |
| 97 const HttpResponseInfo* response_info_; | 100 const HttpResponseInfo* response_info_; |
| 98 | 101 |
| 99 std::vector<std::string> response_cookies_; | 102 std::vector<std::string> response_cookies_; |
| 100 size_t response_cookies_save_index_; | 103 size_t response_cookies_save_index_; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 scoped_ptr<HttpFilterContext> filter_context_; | 215 scoped_ptr<HttpFilterContext> filter_context_; |
| 213 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; | 216 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; |
| 214 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; | 217 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; |
| 215 | 218 |
| 216 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 219 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 217 }; | 220 }; |
| 218 | 221 |
| 219 } // namespace net | 222 } // namespace net |
| 220 | 223 |
| 221 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 224 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |