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 // This class simulates what wininet does when a dns lookup fails. | 4 // This class simulates what wininet does when a dns lookup fails. |
5 | 5 |
6 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 6 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 7 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/common/ref_counted_util.h" | 10 #include "chrome/common/ref_counted_util.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 static net::URLRequest::ProtocolFactory Factory; | 41 static net::URLRequest::ProtocolFactory Factory; |
42 | 42 |
43 // net::URLRequestJob methods. | 43 // net::URLRequestJob methods. |
44 virtual void Start(); | 44 virtual void Start(); |
45 virtual void Kill(); | 45 virtual void Kill(); |
46 virtual bool GetMimeType(std::string* mime_type) const; | 46 virtual bool GetMimeType(std::string* mime_type) const; |
47 virtual bool GetCharset(std::string* charset); | 47 virtual bool GetCharset(std::string* charset); |
48 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 48 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
49 virtual int GetResponseCode() const; | 49 virtual int GetResponseCode() const; |
50 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); | 50 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); |
51 virtual uint64 GetUploadProgress() const; | 51 virtual net::UploadProgress GetUploadProgress() const; |
52 virtual net::HostPortPair GetSocketAddress() const; | 52 virtual net::HostPortPair GetSocketAddress() const; |
53 | 53 |
54 // Peek and process automation messages for URL requests. | 54 // Peek and process automation messages for URL requests. |
55 static bool MayFilterMessage(const IPC::Message& message, int* request_id); | 55 static bool MayFilterMessage(const IPC::Message& message, int* request_id); |
56 void OnMessage(const IPC::Message& message); | 56 void OnMessage(const IPC::Message& message); |
57 | 57 |
58 int id() const { | 58 int id() const { |
59 return id_; | 59 return id_; |
60 } | 60 } |
61 | 61 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // the host. | 123 // the host. |
124 bool is_pending_; | 124 bool is_pending_; |
125 | 125 |
126 // Contains the request status code, which is eventually passed to the http | 126 // Contains the request status code, which is eventually passed to the http |
127 // stack when we receive a Read request for a completed job. | 127 // stack when we receive a Read request for a completed job. |
128 net::URLRequestStatus request_status_; | 128 net::URLRequestStatus request_status_; |
129 | 129 |
130 // Contains the ip address and port of the destination host. | 130 // Contains the ip address and port of the destination host. |
131 net::HostPortPair socket_address_; | 131 net::HostPortPair socket_address_; |
132 | 132 |
| 133 // Size of the upload data appended to the request. |
| 134 uint64 upload_size_; |
| 135 |
133 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; | 136 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; |
134 | 137 |
135 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); | 138 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); |
136 }; | 139 }; |
137 | 140 |
138 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 141 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
OLD | NEW |