| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual void ContinueDespiteLastError(); | 56 virtual void ContinueDespiteLastError(); |
| 57 virtual bool GetMoreData(); | 57 virtual bool GetMoreData(); |
| 58 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); | 58 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); |
| 59 | 59 |
| 60 // Shadows URLRequestJob's version of this method so we can grab cookies. | 60 // Shadows URLRequestJob's version of this method so we can grab cookies. |
| 61 void NotifyHeadersComplete(); | 61 void NotifyHeadersComplete(); |
| 62 | 62 |
| 63 void DestroyTransaction(); | 63 void DestroyTransaction(); |
| 64 void StartTransaction(); | 64 void StartTransaction(); |
| 65 void AddExtraHeaders(); | 65 void AddExtraHeaders(); |
| 66 std::string AssembleRequestCookies(); |
| 66 void FetchResponseCookies(); | 67 void FetchResponseCookies(); |
| 67 | 68 |
| 68 void OnStartCompleted(int result); | 69 void OnStartCompleted(int result); |
| 69 void OnReadCompleted(int result); | 70 void OnReadCompleted(int result); |
| 70 | 71 |
| 72 void RestartTransactionWithAuth(const std::wstring& username, |
| 73 const std::wstring& password); |
| 74 |
| 71 net::HttpRequestInfo request_info_; | 75 net::HttpRequestInfo request_info_; |
| 72 scoped_ptr<net::HttpTransaction> transaction_; | 76 scoped_ptr<net::HttpTransaction> transaction_; |
| 73 const net::HttpResponseInfo* response_info_; | 77 const net::HttpResponseInfo* response_info_; |
| 74 std::vector<std::string> response_cookies_; | 78 std::vector<std::string> response_cookies_; |
| 75 | 79 |
| 76 // Auth states for proxy and origin server. | 80 // Auth states for proxy and origin server. |
| 77 net::AuthState proxy_auth_state_; | 81 net::AuthState proxy_auth_state_; |
| 78 net::AuthState server_auth_state_; | 82 net::AuthState server_auth_state_; |
| 79 | 83 |
| 80 net::CompletionCallbackImpl<URLRequestHttpJob> start_callback_; | 84 net::CompletionCallbackImpl<URLRequestHttpJob> start_callback_; |
| 81 net::CompletionCallbackImpl<URLRequestHttpJob> read_callback_; | 85 net::CompletionCallbackImpl<URLRequestHttpJob> read_callback_; |
| 82 | 86 |
| 83 bool read_in_progress_; | 87 bool read_in_progress_; |
| 84 | 88 |
| 85 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. | 89 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. |
| 86 GURL sdch_dictionary_url_; | 90 GURL sdch_dictionary_url_; |
| 87 | 91 |
| 88 // Keep a reference to the url request context to be sure it's not deleted | 92 // Keep a reference to the url request context to be sure it's not deleted |
| 89 // before us. | 93 // before us. |
| 90 scoped_refptr<URLRequestContext> context_; | 94 scoped_refptr<URLRequestContext> context_; |
| 91 | 95 |
| 92 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 96 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
| 93 }; | 97 }; |
| 94 | 98 |
| 95 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 99 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
| OLD | NEW |