| 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 27 matching lines...) Expand all Loading... |
| 38 static net::URLRequest::ProtocolFactory Factory; | 38 static net::URLRequest::ProtocolFactory Factory; |
| 39 | 39 |
| 40 // net::URLRequestJob methods. | 40 // net::URLRequestJob methods. |
| 41 virtual void Start(); | 41 virtual void Start(); |
| 42 virtual void Kill(); | 42 virtual void Kill(); |
| 43 virtual bool GetMimeType(std::string* mime_type) const; | 43 virtual bool GetMimeType(std::string* mime_type) const; |
| 44 virtual bool GetCharset(std::string* charset); | 44 virtual bool GetCharset(std::string* charset); |
| 45 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 45 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| 46 virtual int GetResponseCode() const; | 46 virtual int GetResponseCode() const; |
| 47 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); | 47 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); |
| 48 virtual uint64 GetUploadProgress() const; | 48 virtual net::UploadProgress GetUploadProgress() const; |
| 49 virtual net::HostPortPair GetSocketAddress() const; | 49 virtual net::HostPortPair GetSocketAddress() const; |
| 50 | 50 |
| 51 // Peek and process automation messages for URL requests. | 51 // Peek and process automation messages for URL requests. |
| 52 static bool MayFilterMessage(const IPC::Message& message, int* request_id); | 52 static bool MayFilterMessage(const IPC::Message& message, int* request_id); |
| 53 void OnMessage(const IPC::Message& message); | 53 void OnMessage(const IPC::Message& message); |
| 54 | 54 |
| 55 int id() const { | 55 int id() const { |
| 56 return id_; | 56 return id_; |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Contains the ip address and port of the destination host. | 127 // Contains the ip address and port of the destination host. |
| 128 net::HostPortPair socket_address_; | 128 net::HostPortPair socket_address_; |
| 129 | 129 |
| 130 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; | 130 base::WeakPtrFactory<URLRequestAutomationJob> weak_factory_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); | 132 DISALLOW_COPY_AND_ASSIGN(URLRequestAutomationJob); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ | 135 #endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_AUTOMATION_JOB_H_ |
| OLD | NEW |